C# Class Squishy.Irc.Client

A Client instance represents the connection to a server. It is working fully asynchronously and has a built-in excess flood protection. For configuring that protection, look into the ThrottledSendQueue class.
Inheritance: Connection
Show file Open project: jaddie/WCell-Utility-Bot Class Usage Examples

Public Methods

Method Description
BeginConnect ( string addr, int port ) : void
OnDisconnecting ( Connection con, bool conLost ) : void
Send ( string text ) : void

If connected, enqueues the given text to the SendQueue.

SendNow ( string text ) : void

If connected, splits the text by line terminators, triggers the IrcClient.OnBeforeSend method and sends each line + "\r\n" immediately to the server. Throws an exception if one of the lines exceed the IRC-conform max of 512 bytes (510 + "\r\n").

Private Methods

Method Description
Client ( IrcClient irc ) : System
OnConnect ( Connection con ) : void
OnConnectFail ( Connection con, Exception e ) : void
OnConnecting ( Connection con ) : void
SendLineNow ( string line ) : void

Method Details

BeginConnect() public method

public BeginConnect ( string addr, int port ) : void
addr string
port int
return void

OnDisconnecting() public method

public OnDisconnecting ( Connection con, bool conLost ) : void
con Connection
conLost bool
return void

Send() public method

If connected, enqueues the given text to the SendQueue.
public Send ( string text ) : void
text string
return void

SendNow() public method

If connected, splits the text by line terminators, triggers the IrcClient.OnBeforeSend method and sends each line + "\r\n" immediately to the server. Throws an exception if one of the lines exceed the IRC-conform max of 512 bytes (510 + "\r\n").
public SendNow ( string text ) : void
text string A string that will be immediately sent.
return void