DccConnection

Represents a DCC connection.

Constructors

this
this(Socket socket, uint timeout, State initialState)

Initialize a DCC resource with the given _socket, timeout value and state.

Members

Enums

State
enum State

Current state of the connection.

Functions

name
string name()

Name of this resource.

onConnected
void onConnected()

Invoked when the connection has been established.

onDisconnected
void onDisconnected()

Invoked when the connection was closed cleanly.

onRead
bool onRead(in void[] data)

Invoked when _data was received.

write
void write(in void[] data)

Write to this connection.

Variables

onError
void delegate(Exception e)[] onError;

Invoked when an error occurs.

onTimeout
void delegate()[] onTimeout;

Invoked when a listening connection has timed out.

state
State state;

Current state of the connection.

timeout
uint timeout;

The timeout value of this connection in seconds.

Meta