SockStream

Provides a stream interface to a Socket which has

Constructors

this
this(Socket socket)

Constructs a new SockStream from the provided socket

Members

Functions

close
void close()

Closes the stream

read
ulong read(byte[] toArray)

Reads bytes from the socket into the provided array and returns without any further waiting, at most the number of bytes read will be the length of the provided array, at minimum a single byte

readFully
ulong readFully(byte[] toArray)

Reads bytes from the socket into the provided array until the array is fully-filled

write
ulong write(byte[] fromArray)

Writes bytes to the socket from the provided array and returns without any further waiting, at most the number of bytes written will be the length of the provided array, at minimum a single byte.

writeFully
ulong writeFully(byte[] fromArray)

Writes bytes to the socket from the provided array until the array has been fully written

Meta