C# Класс Yaircc.Net.IRC.Connection

Represents a connection to an IRC server.
Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
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.

Описание методов

Close() публичный Метод

Closes the socket used to interact with the server.
public Close ( ) : void
Результат void

Connect() публичный Метод

Begin establishing the connection asynchronously.
public Connect ( ) : void
Результат void

Connection() публичный Метод

Initialises a new instance of the Yaircc.Net.IRC.Connection class.
public Connection ( ) : System
Результат System

Connection() публичный Метод

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.
Результат System

Connection() публичный Метод

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.
Результат System

Connection() публичный Метод

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.
Результат System

Dispose() публичный Метод

Disposes the object.
public Dispose ( ) : void
Результат void

Equals() публичный Метод

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.
Результат bool

GetHashCode() публичный Метод

Serves as a hash function for a particular type.
public GetHashCode ( ) : int
Результат int

Parse() публичный Метод

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
Результат ParseResult

RegisterClient() публичный Метод

Sends the registration commands needed when initialising an IRC connection.
public RegisterClient ( ) : void
Результат void

RegisterClient() публичный Метод

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.
Результат void

Send() публичный Метод

Send a string of data to the server
public Send ( string data ) : void
data string The data to send
Результат void

ToString() публичный Метод

Returns a string that represents the current object.
public ToString ( ) : string
Результат string