#include <ServerSocket.h>
Inheritance diagram for acdk::net::ServerSocket:
Public Member Functions | |
ServerSocket (int port=-1) | |
Creates a server socket on a specified port. | |
virtual | ~ServerSocket () |
ServerSocket (int port, int backlog) | |
Creates a server socket and binds it to the specified local port number. | |
ServerSocket (int port, int backlog, IN(RInetAddress) bindAddr) | |
Create a server with the specified port, listen backlog, and local IP address to bind to. | |
RSocket | accept (int timeOut=-1) |
Listens for a connection to be made to this socket and accepts it. | |
void | close () |
Closes this socket. | |
RInetAddress | getInetAddress () |
Returns the local address of this server socket. | |
int | getLocalPort () |
Returns the port on which this socket is listening. | |
int | getSoTimeout () |
Retrive setting for SO_TIMEOUT. | |
void | setSoTimeout (int timeout) |
Enable/disable SO_TIMEOUT with the specified timeout, in milliseconds. | |
bool | getReuseAddress () |
get SO_REUSEADDR flag | |
void | setReuseAddress (bool on) |
set SO_REUSEADDR flag | |
bool | getTcpNoDelay () |
Tests if TCP_NODELAY is enabled. | |
void | setTcpNoDelay (bool on) |
Enable/disable TCP_NODELAY (disable/enable Nagle's algorithm). | |
RString | toString () |
Returns the implementation address and implementation port of this socket as a String. | |
Static Public Member Functions | |
void | setSocketFactory (IN(RSocketImplFactory) fac) |
Sets the server socket implementation factory for the application. | |
Protected Member Functions | |
bool | implAccept (IN(RSocket) s, int timeOut) |
Subclasses of ServerSocket use this method to override accept() to return their own subclass of socket. | |
Private Attributes | |
RSocketImpl | _theSocket |
int | _backlog |
|
Creates a server socket on a specified port. if port == -1 os should select a port |
|
|
|
Creates a server socket and binds it to the specified local port number.
|
|
Create a server with the specified port, listen backlog, and local IP address to bind to.
|
|
Listens for a connection to be made to this socket and accepts it.
|
|
Closes this socket.
|
|
Returns the local address of this server socket.
|
|
Returns the port on which this socket is listening.
|
|
get SO_REUSEADDR flag
|
|
Retrive setting for SO_TIMEOUT.
|
|
Tests if TCP_NODELAY is enabled.
|
|
Subclasses of ServerSocket use this method to override accept() to return their own subclass of socket.
|
|
set SO_REUSEADDR flag
|
|
Sets the server socket implementation factory for the application.
|
|
Enable/disable SO_TIMEOUT with the specified timeout, in milliseconds.
|
|
Enable/disable TCP_NODELAY (disable/enable Nagle's algorithm).
|
|
Returns the implementation address and implementation port of this socket as a String.
Reimplemented from acdk::lang::Object. |
|
|
|
|