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

[more] 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
[more]Socket acceptConnection() throw(SocketException)
Accepts a connection from the server socket
[more] ~ServerSocket() throw(SocketException)
Releases the server socket @throw SocketException on an error

Inherited from Socket:

Public Methods

ovirtual Socket* clone() const
ovoid close() throw(SocketException)
ovirtual int getSocket()
obool getThrowOnClosed()
oSocket& operator=(const Socket& s)
osize_t receive(char* readBuffer, size_t length) throw(SocketException)
osize_t receiveSome(char* readBuffer, size_t length) throw(SocketException)
osize_t send(const char* sendBuffer, size_t length) throw(SocketException)
ovoid setThrowOnClosed(bool throwOnClose)

Protected Fields

oint 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: Get SAFMQ: Store and Forward Message Queue at SourceForge.net. Fast, secure and Free Open Source software downloads