View source code Display the source code in std/socket.d from which this page was generated on github. Improve this page Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using local clone. Page wiki View or edit the community-maintained wiki page associated with this page.

std.socket.socket.select - multiple declarations

Function Socket.select

Wait for a socket to change status. A wait timeout of or TimeVal, may be specified; if a timeout is not specified or the TimeVal is null, the maximum timeout is used. The TimeVal timeout has an unspecified value when select returns.

Prototypes

static int select(
  SocketSet checkRead,
  SocketSet checkWrite,
  SocketSet checkError,
  Duration timeout
) @trusted;

static int select(
  SocketSet checkRead,
  SocketSet checkWrite,
  SocketSet checkError
) @safe;

static int select(
  SocketSet checkRead,
  SocketSet checkWrite,
  SocketSet checkError,
  TimeVal* timeout
) @trusted;

Returns

The number of sockets with status changes, 0 on timeout, or -1 on interruption. If the return value is greater than 0, the SocketSets are updated to only contain the sockets having status changes. For a connecting socket, a write status change means the connection is established and it's able to send. For a listening socket, a read status change means there is an incoming connection request and it's able to accept.

Function Socket.select

Wait for a socket to change status. A wait timeout of or TimeVal, may be specified; if a timeout is not specified or the TimeVal is null, the maximum timeout is used. The TimeVal timeout has an unspecified value when select returns.

Prototypes

static int select(
  SocketSet checkRead,
  SocketSet checkWrite,
  SocketSet checkError,
  Duration timeout
) @trusted;

static int select(
  SocketSet checkRead,
  SocketSet checkWrite,
  SocketSet checkError
) @safe;

static int select(
  SocketSet checkRead,
  SocketSet checkWrite,
  SocketSet checkError,
  TimeVal* timeout
) @trusted;

Returns

The number of sockets with status changes, 0 on timeout, or -1 on interruption. If the return value is greater than 0, the SocketSets are updated to only contain the sockets having status changes. For a connecting socket, a write status change means the connection is established and it's able to send. For a listening socket, a read status change means there is an incoming connection request and it's able to accept.

Function Socket.select

Wait for a socket to change status. A wait timeout of or TimeVal, may be specified; if a timeout is not specified or the TimeVal is null, the maximum timeout is used. The TimeVal timeout has an unspecified value when select returns.

Prototypes

static int select(
  SocketSet checkRead,
  SocketSet checkWrite,
  SocketSet checkError,
  Duration timeout
) @trusted;

static int select(
  SocketSet checkRead,
  SocketSet checkWrite,
  SocketSet checkError
) @safe;

static int select(
  SocketSet checkRead,
  SocketSet checkWrite,
  SocketSet checkError,
  TimeVal* timeout
) @trusted;

Returns

The number of sockets with status changes, 0 on timeout, or -1 on interruption. If the return value is greater than 0, the SocketSets are updated to only contain the sockets having status changes. For a connecting socket, a write status change means the connection is established and it's able to send. For a listening socket, a read status change means there is an incoming connection request and it's able to accept.

Authors

Christopher E. Miller, David Nadlinger, Vladimir Panteleev

License

Boost License 1.0.

Comments