BLOCXX_NAMESPACE::ServerSocket Class Reference

#include <ServerSocket.hpp>

Inheritance diagram for BLOCXX_NAMESPACE::ServerSocket:

BLOCXX_NAMESPACE::SelectableIFC BLOCXX_NAMESPACE::IntrusiveCountableBase List of all members.

Public Member Functions

 ServerSocket (SSLServerCtxRef sslCtx)
 Allocate a new Inet Server Socket.
 ServerSocket (SocketFlags::ESSLFlag isSSL=SocketFlags::E_NOT_SSL)
 Allocate a new Inet Server Socket.
 ServerSocket (const ServerSocket &arg)
 Copy ctor.
Socket accept (int timeoutSecs=-1)
 Accept a connection to the server socket.
void doListen (UInt16 port, SocketFlags::ESSLFlag isSSL, int queueSize=10, const String &listenAddr=SocketAddress::ALL_LOCAL_ADDRESSES, SocketFlags::EReuseAddrFlag reuseAddr=SocketFlags::E_REUSE_ADDR)
 Start listening on a port.
void doListen (UInt16 port, int queueSize=10, const String &listenAddr=SocketAddress::ALL_LOCAL_ADDRESSES, SocketFlags::EReuseAddrFlag reuseAddr=SocketFlags::E_REUSE_ADDR)
 Start listening on a port.
void doListen (const String &filename, int queueSize=10, bool reuseAddr=true)
 Start listening on a Unix Domain Socket.
void close ()
 Close the listen socket
Exceptions:
SocketException. 

SocketAddress getLocalAddress ()
 Return the address of the local host.
SocketHandle_t getfd () const
 Get the file descriptor of the listen socket.
Select_t getSelectObj () const

Private Attributes

IntrusiveReference< ServerSocketImplm_impl

Detailed Description

Definition at line 51 of file ServerSocket.hpp.


Constructor & Destructor Documentation

BLOCXX_NAMESPACE::ServerSocket::ServerSocket SSLServerCtxRef  sslCtx  ) 
 

Allocate a new Inet Server Socket.

Parameters:
sslCtx SSL server-context reference object

Definition at line 45 of file ServerSocket.cpp.

BLOCXX_NAMESPACE::ServerSocket::ServerSocket SocketFlags::ESSLFlag  isSSL = SocketFlags::E_NOT_SSL  ) 
 

Allocate a new Inet Server Socket.

Parameters:
isSSL is the Server Socket an SSL socket?

Definition at line 51 of file ServerSocket.cpp.

BLOCXX_NAMESPACE::ServerSocket::ServerSocket const ServerSocket arg  ) 
 

Copy ctor.

Definition at line 57 of file ServerSocket.cpp.


Member Function Documentation

Socket BLOCXX_NAMESPACE::ServerSocket::accept int  timeoutSecs = -1  ) 
 

Accept a connection to the server socket.

Parameters:
timeoutSecs the timeout
Returns:
an Socket for the connection just accepted.

Definition at line 62 of file ServerSocket.cpp.

References m_impl.

void BLOCXX_NAMESPACE::ServerSocket::close  ) 
 

Close the listen socket

Exceptions:
SocketException. 

Definition at line 90 of file ServerSocket.cpp.

References m_impl.

void BLOCXX_NAMESPACE::ServerSocket::doListen const String filename,
int  queueSize = 10,
bool  reuseAddr = true
 

Start listening on a Unix Domain Socket.

Parameters:
filename The filename for the unix domain socket
queueSize the size of the listen queue
reuseAddr whether to set the reuse address flag
Exceptions:
SocketException 

Definition at line 83 of file ServerSocket.cpp.

References m_impl.

void BLOCXX_NAMESPACE::ServerSocket::doListen UInt16  port,
int  queueSize = 10,
const String listenAddr = SocketAddress::ALL_LOCAL_ADDRESSES,
SocketFlags::EReuseAddrFlag  reuseAddr = SocketFlags::E_REUSE_ADDR
 

Start listening on a port.

Parameters:
port The port to listen on
queueSize the size of the listen queue
listenAddr the listen address
reuseAddr whether to set the reuse address flag
Exceptions:
SocketException 

Definition at line 75 of file ServerSocket.cpp.

References m_impl.

void BLOCXX_NAMESPACE::ServerSocket::doListen UInt16  port,
SocketFlags::ESSLFlag  isSSL,
int  queueSize = 10,
const String listenAddr = SocketAddress::ALL_LOCAL_ADDRESSES,
SocketFlags::EReuseAddrFlag  reuseAddr = SocketFlags::E_REUSE_ADDR
 

Start listening on a port.

Parameters:
port The port to listen on
isSSL is the Server Socket an SSL socket?
queueSize the size of the listen queue
listenAddr the listen address
reuseAddr whether to set the reuse address flag
Exceptions:
SocketException 

Definition at line 68 of file ServerSocket.cpp.

References m_impl.

SocketHandle_t BLOCXX_NAMESPACE::ServerSocket::getfd  )  const
 

Get the file descriptor of the listen socket.

Returns:
a handle to the listen socket

Definition at line 102 of file ServerSocket.cpp.

References m_impl.

SocketAddress BLOCXX_NAMESPACE::ServerSocket::getLocalAddress  ) 
 

Return the address of the local host.

Returns:
an SocketAddress representing the local node

Definition at line 96 of file ServerSocket.cpp.

References m_impl.

Select_t BLOCXX_NAMESPACE::ServerSocket::getSelectObj  )  const [virtual]
 

Implements BLOCXX_NAMESPACE::SelectableIFC.

Definition at line 108 of file ServerSocket.cpp.

References m_impl.


Member Data Documentation

IntrusiveReference<ServerSocketImpl> BLOCXX_NAMESPACE::ServerSocket::m_impl [private]
 

Definition at line 133 of file ServerSocket.hpp.

Referenced by accept(), close(), doListen(), getfd(), getLocalAddress(), and getSelectObj().


The documentation for this class was generated from the following files:
Generated on Fri Jun 16 15:39:11 2006 for blocxx by  doxygen 1.4.6