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.

Class std.socket.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.

Inherits from

Constructors

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

Properties

Name Type Description
max [get] uint Return the current capacity of this SocketSet. The exact

Methods

Name Description
add Add a Socket to the collection.
isSet Return nonzero if this Socket is in the collection.
remove Remove this Socket from the collection.
reset Reset the SocketSet so that there are 0 Sockets in the collection.
factory Create instance of class specified by the fully qualified name classname. The class must either have no constructors or have a default constructor.
opCmp Compare with another Object obj.
opEquals Returns !=0 if this object does have the same contents as obj.
toHash Compute hash function for Object.
toString Convert Object to a human readable string.

Authors

Christopher E. Miller, David Nadlinger, Vladimir Panteleev

License

Boost License 1.0.

Comments