C# 클래스 IrcSharp.IrcClient

Represents a full connection to an irc server with all nesessary members to communicate with it.
With an instance of IrcClient, you can connect to an irc server and receive many events defined by the standard irc protocol. The messages received are automatically parsed to IrcLine objects to be easier accessible.
상속: IIrcObject, IDisposable
파일 보기 프로젝트 열기: hapm/IrcShark 1 사용 예제들

공개 메소드들

메소드 설명
ChangeNickname ( String newNick ) : void

Sends a request to the server, to change the current nickname used by this connection.

This method creates a NICK irc command and send it to the server. The property CurrentNick will be updated after the client received the acknowledge from server.

Be sure that newNick is conform with the Standard used by this connection. Else the nickname will not be changed.

Connect ( ) : void

Connects to the irc server addressed by ServerAddress.

Dispose ( ) : void
IrcClient ( ) : System

Creates a new instance of an IrcClient.

Join ( String chanName ) : void

Joins a given channel on the irc server.

The given chanName should follow the given Standard of the IrcClient. The IrcClient will wait for the acknowledge of the server.

Part ( String chanName ) : void

Parts a given channel on the irc server.

chanName should follow the given Standard of the IrcClient. The IrcClient will wait for the acknowledge of the server.

Quit ( ) : void

Close the IRC Connection without a Message.

Quit ( String QuitMsg ) : void

Close the IRC Connection with a Message.

SendLine ( String line ) : void

Sends a raw irc line to the irc server.

You can send anything you want. The text is send as is. There is no checking or something.

SendNotice ( String message, String receiver ) : void

Sends a message to a channel, nick (directly).

SendPrivmsg ( String message, String receiver ) : void

Sends a message to a channel, nick (in a querry).

비공개 메소드들

메소드 설명
HandleLine ( LineReceivedEventArgs e ) : void

Handles a line received from server.

OnError ( ErrorEventArgs args ) : void
ReadLines ( ) : void

Reads lines from server and parses them to an IrcLine.

메소드 상세

ChangeNickname() 공개 메소드

Sends a request to the server, to change the current nickname used by this connection.

This method creates a NICK irc command and send it to the server. The property CurrentNick will be updated after the client received the acknowledge from server.

Be sure that newNick is conform with the Standard used by this connection. Else the nickname will not be changed.

public ChangeNickname ( String newNick ) : void
newNick String The new nickname, what should be used.
리턴 void

Connect() 공개 메소드

Connects to the irc server addressed by ServerAddress.
public Connect ( ) : void
리턴 void

Dispose() 공개 메소드

public Dispose ( ) : void
리턴 void

IrcClient() 공개 메소드

Creates a new instance of an IrcClient.
public IrcClient ( ) : System
리턴 System

Join() 공개 메소드

Joins a given channel on the irc server.
The given chanName should follow the given Standard of the IrcClient. The IrcClient will wait for the acknowledge of the server.
public Join ( String chanName ) : void
chanName String the channel name the client should join
리턴 void

Part() 공개 메소드

Parts a given channel on the irc server.
chanName should follow the given Standard of the IrcClient. The IrcClient will wait for the acknowledge of the server.
public Part ( String chanName ) : void
chanName String the channel name the client should join
리턴 void

Quit() 공개 메소드

Close the IRC Connection without a Message.
public Quit ( ) : void
리턴 void

Quit() 공개 메소드

Close the IRC Connection with a Message.
public Quit ( String QuitMsg ) : void
QuitMsg String
리턴 void

SendLine() 공개 메소드

Sends a raw irc line to the irc server.
You can send anything you want. The text is send as is. There is no checking or something.
public SendLine ( String line ) : void
line String the raw line to send
리턴 void

SendNotice() 공개 메소드

Sends a message to a channel, nick (directly).
public SendNotice ( String message, String receiver ) : void
message String the message to send
receiver String the receiver (a channel or a nick)
리턴 void

SendPrivmsg() 공개 메소드

Sends a message to a channel, nick (in a querry).
public SendPrivmsg ( String message, String receiver ) : void
message String the message to send
receiver String the receiver (a channel or a nick)
리턴 void