class tcpsocket::ServerSocket
A class which implements a TCP server socket
Child Classes
A class which implements a TCP server socket
- This class has no child classes.
Inheritance:
Public Methods
-
ServerSocket(short bindPort, in_addr_t bindAddress, int listenerBacklog) throw(SocketException)
-
Constructs the server socket binding to the port and optionally using the bind address and listener backlog
-
Socket acceptConnection() throw(SocketException)
-
Accepts a connection from the server socket
-
~ServerSocket() throw(SocketException)
-
Releases the server socket
@throw SocketException on an error
Inherited from Socket:
Public Methods
-
virtual Socket* clone() const
-
void close() throw(SocketException)
-
virtual int getSocket()
-
bool getThrowOnClosed()
-
Socket& operator=(const Socket& s)
-
size_t receive(char* readBuffer, size_t length) throw(SocketException)
-
size_t receiveSome(char* readBuffer, size_t length) throw(SocketException)
-
size_t send(const char* sendBuffer, size_t length) throw(SocketException)
-
void setThrowOnClosed(bool throwOnClose)
Protected Fields
int m_socket
Member Documentation
ServerSocket (short bindPort, in_addr_t bindAddress, int listenerBacklog) throw(SocketException)-
Constructs the server socket binding to the port and optionally using the bind address and listener backlog
- Parameters:
- bindPort - [in] The TCP port to bind to
bindAddress - [in,optional] Optional address to bind to, if not specified all local address
will be bound.
listenerBacklog - [in,optional] Optional depth of the listener queue.
@throw SocketException on an error
~ServerSocket () throw(SocketException)-
Releases the server socket
@throw SocketException on an error
Socket acceptConnection () throw(SocketException)-
Accepts a connection from the server socket
- Returns:
- A socket connected to a client
@throw SocketException on an error
Table of Contents HTML hierarchy of classes or Java
Safmq Documentation, copyright (c) 2004-2010 Matthew J. Battey, Licensed Under Apache License Ver 2.0
Powered By: