Thresher 1.2 Class Documentation

CtcpListener Class

This class is used to send CTCP specific events. Once registered with this object the client can receive notification of all CTCP requests, pings, and replies. Instances of this class are not created directly but are retrieved as a property from a Connection object.

For a list of all members of this type, see CtcpListener Members.


[Visual Basic]
Public Class CtcpListener
public class CtcpListener


All CTCP messages come in Request/Reply pairs. Each event signals either the Request or the Response. All CTCP queries (with the exception of CTCP Ping) are very similiar so they are all handled by the same set of events.


             //Create a Connection object which will support CTCP (second bool param).
             Connection connection = new Connection( args, true, false );	
             //Register a delegate on this CtcpListener.
             connection.CtcpListener.OnCtcpRequest += new CtcpRequestEventHandler( MyOnCtcpRequest );
             //If the Connection was created without CTCP support then this property will return null.
             //However, CTCP can be turned on and off dynamically. To enable it at a later time call:
             connection.EnableCtcp = true;
             //Now you can register listeners as above.
             //Setting EnableCtcp to false will delete the instance of CtcpListener and no more
             //CTCP events will be raised.


Namespace: Sharkbite.Irc

Assembly: Sharkbite.Thresher (in Sharkbite.Thresher.dll)

See Also

CtcpListener Members | Sharkbite.Irc Namespace