IConnection

Common interface for connections and adapters.

Members

Aliases

BufferFlushedHandler
alias BufferFlushedHandler = void delegate()

Callback setter for when all queued data has been sent.

ConnectHandler
alias ConnectHandler = void delegate()

Callback setter for when a connection has been established (if applicable).

DisconnectHandler
alias DisconnectHandler = void delegate(string reason, DisconnectType type)

Callback setter for when a connection was closed.

ReadDataHandler
alias ReadDataHandler = void delegate(Data data)

Callback setter for when new data is read.

Functions

disconnect
void disconnect(string reason, DisconnectType type)

Terminate the connection.

send
void send(Data[] data, int priority)
void send(Data datum, int priority)

Queue Data for sending.

Manifest constants

DEFAULT_PRIORITY
enum DEFAULT_PRIORITY;

send queues data for sending in one of five queues, indexed by a numeric priority. MAX_PRIORITY is the highest (least urgent) priority index. DEFAULT_PRIORITY is the default priority

MAX_PRIORITY
enum MAX_PRIORITY;

send queues data for sending in one of five queues, indexed by a numeric priority. MAX_PRIORITY is the highest (least urgent) priority index. DEFAULT_PRIORITY is the default priority

Properties

connected
deprecated bool connected [@property getter]

Has a connection been established?

disconnecting
deprecated bool disconnecting [@property getter]

Are we in the process of disconnecting? (Waiting for data to be flushed)

handleBufferFlushed
BufferFlushedHandler handleBufferFlushed [@property setter]
Undocumented in source.
handleConnect
ConnectHandler handleConnect [@property setter]
Undocumented in source.
handleDisconnect
DisconnectHandler handleDisconnect [@property setter]
Undocumented in source.
handleReadData
ReadDataHandler handleReadData [@property setter]
Undocumented in source.
state
ConnectionState state [@property getter]

Get connection state.

Static variables

defaultDisconnectReason
auto defaultDisconnectReason;

This is the default value for the disconnect reason string parameter.

Meta