Inheritance diagram for ServerSocket:
Public Member Functions | |
this (InternetAddress addr, int backlog, bool socketReuse=false) | |
void | setLingerPeriod (int period) |
SocketConduit | accept () |
Protected Member Functions | |
override Socket | createSocket (socket_t handle) |
Private Member Functions | |
this (socket_t sock) | |
this (Socket.AddressFamily af, Socket.Type type, Socket.Protocol protocol) | |
this () | |
void | set (socket_t sock) |
void | reset () |
void | create (Socket.AddressFamily af, Socket.Type type, Socket.Protocol protocol) |
socket_t | handle () |
char[] | toString () |
bit | blocking () |
void | blocking (bit byes) |
AddressFamily | addressFamily () |
bit | isAlive () |
void | bind (Address addr) |
void | connect (Address to) |
void | listen (int backlog) |
void | shutdown () |
void | shutdown (Socket.Shutdown how) |
void | setAddressReuse (bool enabled) |
bool | setGroup (InternetAddress address, Socket.Option option) |
void | closure () |
bit | poll (events) |
Static Private Member Functions | |
bool | isCancelled () |
void | cancelAll (bool cancel) |
int | select (SocketSet checkRead, SocketSet checkWrite, SocketSet checkError, timeval *tv) |
int | select (SocketSet checkRead, SocketSet checkWrite, SocketSet checkError, int microseconds) |
int | select (SocketSet checkRead, SocketSet checkWrite, SocketSet checkError) |
Private Attributes | |
int | linger = -1 |
Definition at line 55 of file ServerSocket.d.
|
Construct a ServerSocket on the given address, with the specified number of backlog connections supported. The socket is bound to the given address, and set to listen for incoming connections. Note that the socket address can be setup for reuse, so that a halted server may be restarted immediately. Definition at line 70 of file ServerSocket.d. References Socket::bind(), Socket::listen(), and Socket::setAddressReuse(). |
|
Set the period in which dead sockets are left lying around by the O/S Reimplemented from Socket. Definition at line 85 of file ServerSocket.d. References linger. |
|
Wait for a client to connect to us, and return a connected SocketConduit. Reimplemented from Socket. Definition at line 97 of file ServerSocket.d. References Socket::accept(). Referenced by ServerThread::run(). |
|
Overrides the default socket behaviour to create a socket for an incoming connection. Here we provide a SocketConduit instead. Reimplemented from Socket. Definition at line 110 of file ServerSocket.d. References Socket::create(), linger, and Socket::setLingerPeriod(). |
|
Construct a Socket from a handle. This is used internally to create new Sockets via an accept(). Reimplemented in SocketConduit. Definition at line 480 of file Socket.d. References Socket::set(), and Socket::sock. |
|
Definition at line 774 of file Socket.d. References Resource::acquire(), and Socket::create(). |
|
Set the default lock to be this object Reimplemented in DatagramSocket, and SocketConduit. Definition at line 74 of file Resource.d. References Resource::_lock. |
|
MANGO: moved this out from the above constructor so that it can be called from the FreeList version of SocketConduit Definition at line 493 of file Socket.d. References Resource::acquire(). Referenced by SocketConduit::VersionUseFreeList::allocate(), and Socket::this(). |
|
MANGO: added to reset socket Definition at line 507 of file Socket.d. References INVALID_SOCKET. Referenced by SocketConduit::VersionUseFreeList::deallocate(). |
|
MANGO: added for subscriber control Definition at line 521 of file Socket.d. References Socket::cancelled. |
|
MANGO: added for subscriber control Definition at line 532 of file Socket.d. References Socket::cancelled, and version. |
|
MANGO: added for multicast support Definition at line 789 of file Socket.d. References Socket::_family, and Socket::sock. Referenced by createSocket(), MulticastSocket::leave(), and Socket::this(). |
|
get underlying socket handle Definition at line 804 of file Socket.d. References Socket::sock. Referenced by Socket::setGroup(). |
|
|
|
getter Definition at line 827 of file Socket.d. References Socket::_blocking, and version. |
|
setter Definition at line 846 of file Socket.d. References Socket::_blocking, Socket::sock, SOCKET_ERROR, and version. |
|
Definition at line 877 of file Socket.d. References Socket::_family. |
|
Definition at line 888 of file Socket.d. References Socket::sock, and SOCKET_ERROR. |
|
Definition at line 900 of file Socket.d. References Address::name(), Address::nameLen(), Socket::sock, and SOCKET_ERROR. Referenced by MulticastSocket::join(), and this(). |
|
Definition at line 912 of file Socket.d. References Address::name(), Address::nameLen(), Socket::sock, SOCKET_ERROR, and version. Referenced by HttpClient::open(), ConnectionPool::PoolConnection::reset(), VersionMango::SocketAppender::setAddress(), testClient(), testClusterServer(), testHttpClient(), testHttpClient2(), testSocket(), and testSocketRegex(). |
|
need to bind() first Definition at line 944 of file Socket.d. References Socket::sock, and SOCKET_ERROR. Referenced by this(). |
|
Definition at line 992 of file Socket.d. References Socket::sock. Referenced by HttpClient::close(), and testClient(). |
|
Definition at line 1002 of file Socket.d. References Socket::sock. |
|
MANGO: added Definition at line 1032 of file Socket.d. References Socket::setOption(). Referenced by MulticastSocket::join(), and this(). |
|
Helper function to handle the adding and dropping of group membership. MANGO: Added Definition at line 1048 of file Socket.d. References Socket::handle(), InternetAddress::sin, and SOCKET_ERROR. Referenced by MulticastSocket::pauseGroup(), and MulticastSocket::resumeGroup(). |
|
calling shutdown() before this is recommended for connection- oriented sockets MANGO: changed from close() to IResource.closure() Reimplemented from Resource. Definition at line 1073 of file Socket.d. References Socket::sock, and version. Referenced by MulticastSocket::leave(). |
|
SocketSet's are updated to include only those sockets which an event occured. Returns the number of events, 0 on timeout, or -1 on interruption for a connect()ing socket, writeability means connected for a listen()ing socket, readability means listening Winsock: possibly internally limited to 64 sockets per set Definition at line 1378 of file Socket.d. Referenced by Socket::poll(), and SocketConduit::reader(). |
|
|
|
maximum timeout |
|
Definition at line 1458 of file Socket.d. References Socket::select(). |
|
Definition at line 57 of file ServerSocket.d. Referenced by createSocket(), and setLingerPeriod(). |