C# Класс Squishy.Irc.Dcc.Dcc

Wrapper class for handling all kinds of Dcc events / actions. TODO: Maybe make it possible to have more than one transfer for the same file? TODO: Fileserver
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
Chat ( string target, System.TimeSpan timeout, int port ) : DccChatClient

Sends a Dcc Chat request to the specified target and establishs a DccChatClient and a corresponding Listener with a custom timeout to listen for the incoming Chat Session.

Chat ( string target, int port ) : DccChatClient

Sends a Dcc Chat request to the specified target and establishs a DccChatClient and a corresponding Listener with the default timeout (1 Minute) to listen for the incoming chat session.

GetChatClient ( IrcUser user ) : DccChatClient
GetChatClient ( string nick ) : DccChatClient

Returns a DccChatClient that is established with the user who has the corresponding nick.

GetTransferClient ( IrcUser user, string filename ) : DccTransferClient

Returns a DccTransferClient that is established with the given user and transferring the specific file or null.

GetTransferClients ( IrcUser user ) : List

Returns an array of DccTransferClients that are established with the corresponding user.

Send ( string target, string filename, System.TimeSpan timeout, int port ) : DccSendClient

Sends a Dcc Send request to the specified target and establishs a DccSendListener with a custom timeout to listen for a user in order to start a file transfer.

Send ( string target, string filename, int port ) : DccSendClient

Sends a Dcc Send request to the specified target and establishs a DccSendListener with the default timeout to listen for the incoming Chat Session.

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

Метод Описание
AddChatClient ( DccChatClient client ) : void
AddTransferClient ( DccTransferClient client ) : void
BytesTransferredNotify ( DccTransferClient client, int amount ) : void
ChatClosedNotify ( DccChatClient client ) : void
ChatEstablishedNotify ( DccChatClient client ) : void
ChatFailedNotify ( DccChatClient client, Exception ex ) : void
ChatMessageReceivedNotify ( DccChatClient client, StringStream text ) : void
ChatRequestedNotify ( DccChatArgs args ) : void
Dcc ( IrcClient irc ) : System
Handle ( IrcUser user, string info ) : void
HandleAccept ( IrcUser user, string args ) : void
HandleChat ( IrcUser user, string args ) : void
HandleInvalid ( IrcUser user, string command, string args ) : void
HandleResume ( IrcUser user, string args ) : void
HandleSend ( IrcUser user, string args ) : void
InvalidRequestNotify ( IrcUser user, string request, string args ) : void
ListenerFailedNotify ( Squishy.Irc.Dcc.DccListener serv, Exception ex ) : void
ListenerTimeoutNotify ( Squishy.Irc.Dcc.DccListener listener ) : void
ReceiveTimeoutNotify ( DccReceiveClient client ) : void
RemoveChatClient ( DccChatClient client ) : void
RemoveTransferClient ( DccTransferClient client ) : void
RequestReceivedNotify ( IrcUser user, string request, string args ) : void
SendRequestedNotify ( DccReceiveArgs args ) : void
StartReceive ( IrcUser user, FileInfo dest, IPEndPoint endPoint, long size, System.TimeSpan timeout ) : void
TransferDoneNotify ( DccTransferClient client ) : void
TransferEstablishedNotify ( DccTransferClient client ) : void
TransferFailedNotify ( DccTransferClient client, Exception ex ) : void

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

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

Sends a Dcc Chat request to the specified target and establishs a DccChatClient and a corresponding Listener with a custom timeout to listen for the incoming Chat Session.
public Chat ( string target, System.TimeSpan timeout, int port ) : DccChatClient
target string The nick of the user who should receive a file.
timeout System.TimeSpan Specifies how long the listener should wait for an incoming receiver.
port int
Результат DccChatClient

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

Sends a Dcc Chat request to the specified target and establishs a DccChatClient and a corresponding Listener with the default timeout (1 Minute) to listen for the incoming chat session.
public Chat ( string target, int port ) : DccChatClient
target string The nick of the user who a chat session is supposed to be established with.
port int
Результат DccChatClient

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

public GetChatClient ( IrcUser user ) : DccChatClient
user IrcUser
Результат DccChatClient

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

Returns a DccChatClient that is established with the user who has the corresponding nick.
public GetChatClient ( string nick ) : DccChatClient
nick string
Результат DccChatClient

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

Returns a DccTransferClient that is established with the given user and transferring the specific file or null.
public GetTransferClient ( IrcUser user, string filename ) : DccTransferClient
user IrcUser
filename string
Результат DccTransferClient

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

Returns an array of DccTransferClients that are established with the corresponding user.
public GetTransferClients ( IrcUser user ) : List
user IrcUser
Результат List

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

Sends a Dcc Send request to the specified target and establishs a DccSendListener with a custom timeout to listen for a user in order to start a file transfer.
public Send ( string target, string filename, System.TimeSpan timeout, int port ) : DccSendClient
target string The nick of the user who should receive a file.
filename string The name of the file which should be sent.
timeout System.TimeSpan Specifies how long the listener should wait for an incoming receiver.
port int
Результат DccSendClient

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

Sends a Dcc Send request to the specified target and establishs a DccSendListener with the default timeout to listen for the incoming Chat Session.
public Send ( string target, string filename, int port ) : DccSendClient
target string The nick of the user who should receive a file.
filename string The name of the file which should be sent.
port int
Результат DccSendClient