The OpenD Programming Language

SocketSet

A collection of sockets for use with Socket.select.

SocketSet wraps the platform fd_set type. However, unlike fd_set, SocketSet is not statically limited to FD_SETSIZE or any other limit, and grows as needed.

Constructors

this
this(size_t size)

Create a SocketSet with a specific initial capacity (defaults to FD_SETSIZE, the system's default capacity).

Members

Functions

add
void add(Socket s)

Add a Socket to the collection. The socket must not already be in the collection.

isSet
int isSet(Socket s)

Return nonzero if this Socket is in the collection.

remove
void remove(Socket s)

Remove this Socket from the collection. Does nothing if the socket is not in the collection already.

reset
void reset()

Reset the SocketSet so that there are 0 Sockets in the collection.

Properties

max
uint max [@property getter]

Meta