UnbufferedSocketStreamBase

A wrapper around a socket that provides stream functionality without buffering.

Constructors

this
this(Socket socket)

Create a new Stream from an existing Socket.

this
this(Address address)

Create a new SocketStream that is connected to address as a client. The socket is created in streaming mode (obviously).

Destructor

~this
~this()

Detach the socket from this socket stream and return it.

Postblit

this(this)
this(this)

Copying is disabled, because reference counting should be used instead.

Alias This

_socket

Members

Aliases

put
alias put = write

Writes data to the socket.

Functions

close
void close()

If the Socket is open, shut down both directions and close. Otherwise, it does nothing.

detach
Socket detach()

Detach the socket from this socket stream and return it.

read
size_t read(ubyte[] buf)

Reads data from the socket.

write
size_t write(ubyte[] data)

Writes data to the socket.

Properties

isOpen
isOpen [@property getter]

Returns true if the socket is alive.

socket
socket [@property getter]

Returns the underlying Socket.

Meta