In file socket.hxx:

class OAcceptorSocket : public OSocket

A socket to accept incoming connections

Inheritance:


Public Methods

TResult acceptConnection (OStreamSocket& Connection)
Accepts incoming connections on the socket
TResult acceptConnection (OStreamSocket& Connection, OSocketAddr& PeerAddr)
Accepts incoming connections on the socket
Boolean listen (int MaxPendingConnections= -1)
Prepare a socket for the accept-call
OAcceptorSocket (TAddrFamily Family= af_inet, TProtocol Protocol= protocol_ip, TSocketType Type= sock_stream)
Creates a socket that can accept connections
OAcceptorSocket (const OAcceptorSocket& Socket)
Copy constructor
virtual ~OAcceptorSocket ()
Destructor

Inherited from OSocket:

Public Methods

Boolean bind(const OSocketAddr& LocalInterface)
int clearError()
void close()
Boolean enableNonBlockingMode(Boolean On= True)
TSocketError getError()
void getError(char* pBuffer, int nSize)
void getLocalAddr(OSocketAddr& Addr)
const char* getLocalHost()
int getLocalPort()
int getOption(TSocketOption Option, void* pBuffer, int BufferLen, TSocketOptionLevel Level= sol_socket)
void getPeerAddr(OSocketAddr& Addr)
const char* getPeerHost()
int getPeerPort()
TSocketType getType()
Boolean isExceptionPending(int wp_sec, int wp_usec = 0)
Boolean isRecvReady(int wp_sec, int wp_usec = 0)
Boolean isSendReady(int wp_sec, int wp_usec = 0)
Boolean isValid()
operator oslSocket()
operator oslSocket()
int setBroadcast(int opt = -1)
int setDebug(int opt = -1)
int setDontRoute(int opt = -1)
int setKeepAlive(int opt = -1)
int setLinger(int time = -1)
int setOobinline(int opt = -1)
Boolean setOption(TSocketOption Option, void* pBuffer, int BufferLen, TSocketOptionLevel Level= sol_socket)
int setRecvBufSize(int size =-1)
int setRecvTimeout(int time= -1)
int setReuseAddr(int opt = -1)
int setSendBufSize(int size =-1)
int setSendTimeout(int time= -1)
int setTcpNoDelay(int sz =-1)

Inherited from ISocketTypes:


Documentation

A socket to accept incoming connections
OAcceptorSocket(TAddrFamily Family= af_inet, TProtocol Protocol= protocol_ip, TSocketType Type= sock_stream)
Creates a socket that can accept connections.
Parameters:
Type - For some protocols it might be desirable to use a different type than sock_stream (like sock_seqpacket). Therefore we do not hide this parameter here.

OAcceptorSocket(const OAcceptorSocket& Socket)
Copy constructor

virtual ~OAcceptorSocket()
Destructor. Closes the socket and destroys the underlying oslSocket.

Boolean listen(int MaxPendingConnections= -1)
Prepare a socket for the accept-call
Returns:
True if call was successful.
Parameters:
MaxPendingConnections - The maximum number of pending connections (waiting to be accepted) on this socket. If you use -1, a system default value is used.

TResult acceptConnection(OStreamSocket& Connection)
Accepts incoming connections on the socket. You must precede this call with bind() and listen().
Returns:
result_ok: if a connection has been accepted, result_timeout: if m_RecvTimeout milliseconds passed without connect, result_error: on errors.
Parameters:
Connection - receives the incoming connection.

TResult acceptConnection(OStreamSocket& Connection, OSocketAddr& PeerAddr)
Accepts incoming connections on the socket. You must precede this call with bind() and listen().
Returns:
True if a connection has been accepted, False on errors. result_ok: if a connection has been accepted, result_timeout: if m_RecvTimeout milliseconds passed without connect, result_error: on errors.
Parameters:
PeerAddr - receives the address of the connecting entity (your communication partner).
Connection - receives the incoming connection.


This class has no child classes.

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de