Thresher 1.2 Class Documentation

DccFileSession.Send Method 

Attempt to send a file to a remote user. Start listening on the given port and address. If the remote user does not accept the offer within the timeout period the the session will be closed.

[Visual Basic]
Public Shared Function Send( _
   ByVal dccUserInfo As DccUserInfo, _
   ByVal listenIPAddress As String, _
   ByVal listenPort As Integer, _
   ByVal dccFileInfo As DccFileInfo, _
   ByVal bufferSize As Integer, _
   ByVal turbo As Boolean _
) As DccFileSession
public static DccFileSession Send(
   DccUserInfo dccUserInfo,
   string listenIPAddress,
   int listenPort,
   DccFileInfo dccFileInfo,
   int bufferSize,
   bool turbo


The information about the remote user.
The IP address of the local machine in dot quad format (e.g. This is the address that will be sent to the remote user. The IP address of the NAT machine must be used if the client is behind a NAT/Firewall system.
The port that the session will listen on.
The file to be sent. If the file name has spaces in it they will be replaced with underscores when the name is sent.
The size of the send buffer. Generally should be between 4k and 32k.
True to use send-ahead mode for transfers.

Return Value

A unique session instance for this file and remote user.


This method should be called from within a try/catch block in case there are socket errors. This methods will also automatically handle a Resume if the remote client requests it.


Exception TypeCondition
ArgumentExceptionIf the listen port is already in use.

See Also

DccFileSession Class | Sharkbite.Irc Namespace