C# Class Yaircc.Net.IRC.Connection

Represents a connection to an IRC server.
Inheritance: IDisposable
Afficher le fichier Open project: rastating/yaircc Class Usage Examples

Méthodes publiques

Méthode Description
Close ( ) : void

Closes the socket used to interact with the server.

Connect ( ) : void

Begin establishing the connection asynchronously.

Connection ( ) : System

Initialises a new instance of the Yaircc.Net.IRC.Connection class.

Connection ( string server ) : System

Initialises a new instance of the Yaircc.Net.IRC.Connection class.

Connection ( string server, int port ) : System

Initialises a new instance of the Yaircc.Net.IRC.Connection class.

Connection ( string server, int port, string password ) : System

Initialises a new instance of the Yaircc.Net.IRC.Connection class.

Dispose ( ) : void

Disposes the object.

Equals ( object obj ) : bool

Determines whether the specified object is equal to the current object.

GetHashCode ( ) : int

Serves as a hash function for a particular type.

Parse ( string command ) : ParseResult

Parses command and returns a ParseResult object to indicate the result of the operation

RegisterClient ( ) : void

Sends the registration commands needed when initialising an IRC connection.

RegisterClient ( string password, string username, string nickname, string realName ) : void

Sends the registration commands needed when initialising an IRC connection.

Send ( string data ) : void

Send a string of data to the server

ToString ( ) : string

Returns a string that represents the current object.

Private Methods

Méthode Description
ConnectCallback ( IAsyncResult result ) : void

Handles the connection request callback of the under lying socket.

ReceiveCallback ( IAsyncResult result ) : void

Handles the incoming data callback of the under lying socket.

ReplyToPing ( string rawData ) : void

Send a reply to a ping command.

Send ( byte data ) : void

Send a string of data to the server

SendCallback ( IAsyncResult result ) : void

Handles the outgoing data callback of the under lying socket.

Timer_Elapsed ( object sender, System e ) : void

Handles the Elapsed event of System.Timers.Timer.

Method Details

Close() public méthode

Closes the socket used to interact with the server.
public Close ( ) : void
Résultat void

Connect() public méthode

Begin establishing the connection asynchronously.
public Connect ( ) : void
Résultat void

Connection() public méthode

Initialises a new instance of the Yaircc.Net.IRC.Connection class.
public Connection ( ) : System
Résultat System

Connection() public méthode

Initialises a new instance of the Yaircc.Net.IRC.Connection class.
public Connection ( string server ) : System
server string The server that will be connected to.
Résultat System

Connection() public méthode

Initialises a new instance of the Yaircc.Net.IRC.Connection class.
public Connection ( string server, int port ) : System
server string The server that will be connected to.
port int The port number on which to connect to.
Résultat System

Connection() public méthode

Initialises a new instance of the Yaircc.Net.IRC.Connection class.
public Connection ( string server, int port, string password ) : System
server string The server that will be connected to.
port int The port number on which to connect to.
password string The password of the server.
Résultat System

Dispose() public méthode

Disposes the object.
public Dispose ( ) : void
Résultat void

Equals() public méthode

Determines whether the specified object is equal to the current object.
public Equals ( object obj ) : bool
obj object The object to compare with the current object.
Résultat bool

GetHashCode() public méthode

Serves as a hash function for a particular type.
public GetHashCode ( ) : int
Résultat int

Parse() public méthode

Parses command and returns a ParseResult object to indicate the result of the operation
public Parse ( string command ) : ParseResult
command string The command issued by the user to parse
Résultat ParseResult

RegisterClient() public méthode

Sends the registration commands needed when initialising an IRC connection.
public RegisterClient ( ) : void
Résultat void

RegisterClient() public méthode

Sends the registration commands needed when initialising an IRC connection.
public RegisterClient ( string password, string username, string nickname, string realName ) : void
password string The password of the server.
username string The user name to connect with.
nickname string The nick name to connect with.
realName string The real name to connect with.
Résultat void

Send() public méthode

Send a string of data to the server
public Send ( string data ) : void
data string The data to send
Résultat void

ToString() public méthode

Returns a string that represents the current object.
public ToString ( ) : string
Résultat string