Duplex

Separates reading and writing, e.g. for stdin/stdout.

Constructors

this
this(IConnection reader, IConnection writer)
Undocumented in source.

Members

Aliases

send
alias send = IConnection.send
Undocumented in source.

Functions

disconnect
void disconnect(string reason, DisconnectType type)

Terminate the connection. Note: this isn't quite fleshed out - applications may want to wait and send some more data even after stdin is closed, but such an interface can't be fitted into an IConnection

onConnect
void onConnect()
Undocumented in source. Be warned that the author may not have intended to support it.
onDisconnect
void onDisconnect(string reason, DisconnectType type)
Undocumented in source. Be warned that the author may not have intended to support it.
send
void send(Data[] data, int priority)

Queue Data for sending.

Properties

handleBufferFlushed
BufferFlushedHandler handleBufferFlushed [@property setter]

Callback setter for when all queued data has been written.

handleConnect
ConnectHandler handleConnect [@property setter]

Callback for when a connection has been established.

handleDisconnect
DisconnectHandler handleDisconnect [@property setter]

Callback setter for when a connection was closed.

handleReadData
ReadDataHandler handleReadData [@property setter]

Callback setter for when new data is read.

state
ConnectionState state [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

reader
IConnection reader;
writer
IConnection writer;
Undocumented in source.

Inherited Members

From IConnection

MAX_PRIORITY
enum MAX_PRIORITY;
Undocumented in source.
DEFAULT_PRIORITY
enum DEFAULT_PRIORITY;
Undocumented in source.
defaultDisconnectReason
auto defaultDisconnectReason;
Undocumented in source.
state
ConnectionState state [@property getter]

Get connection state.

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)

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

Queue Data for sending.

disconnect
void disconnect(string reason, DisconnectType type)

Terminate the connection.

ConnectHandler
alias ConnectHandler = void delegate()

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

handleConnect
ConnectHandler handleConnect [@property setter]
Undocumented in source.
ReadDataHandler
alias ReadDataHandler = void delegate(Data data)

Callback setter for when new data is read.

handleReadData
ReadDataHandler handleReadData [@property setter]
Undocumented in source.
DisconnectHandler
alias DisconnectHandler = void delegate(string reason, DisconnectType type)

Callback setter for when a connection was closed.

handleDisconnect
DisconnectHandler handleDisconnect [@property setter]
Undocumented in source.
BufferFlushedHandler
alias BufferFlushedHandler = void delegate()

Callback setter for when all queued data has been sent.

handleBufferFlushed
BufferFlushedHandler handleBufferFlushed [@property setter]
Undocumented in source.

Meta