TCPTransport

Manage TCP transport connection details and tasks.

@safe
struct TCPTransport {}

Constructors

this
this(string host, ushort port)

Instantiate a TCPTransport object.

this
this(Socket socket)

This constructor is for unit testing.

Members

Functions

close
void close()

Close the transport's underlying socket.

isAlive
bool isAlive()

Query the transport to see if it's still active.

send
size_t send(char[] data)

Send the provided data and return the number of bytes sent.

Mixins

__anonymous
mixin ReceiveJSON
Undocumented in source.

Mixed In Members

From mixin ReceiveJSON

receiveJSONObjectOrArray
char[] receiveJSONObjectOrArray()

Receive a single JSON object or array from the socket stream.

Meta