OW_NAMESPACE::ServerSocket Class Reference

#include <OW_ServerSocket.hpp>

Inheritance diagram for OW_NAMESPACE::ServerSocket:

Inheritance graph
[legend]
Collaboration diagram for OW_NAMESPACE::ServerSocket:

Collaboration graph
[legend]
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 49 of file OW_ServerSocket.hpp.


Constructor & Destructor Documentation

OW_NAMESPACE::ServerSocket::ServerSocket SSLServerCtxRef  sslCtx  ) 
 

Allocate a new Inet Server Socket.

Parameters:
isSSL is the Server Socket an SSL socket?

Definition at line 45 of file OW_ServerSocket.cpp.

OW_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 OW_ServerSocket.cpp.

OW_NAMESPACE::ServerSocket::ServerSocket const ServerSocket arg  ) 
 

Copy ctor.

Definition at line 57 of file OW_ServerSocket.cpp.


Member Function Documentation

Socket OW_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 OW_ServerSocket.cpp.

References m_impl.

void OW_NAMESPACE::ServerSocket::close  ) 
 

Close the listen socket

Exceptions:
SocketException. 

Definition at line 90 of file OW_ServerSocket.cpp.

References m_impl.

void OW_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
Exceptions:
SocketException 

Definition at line 83 of file OW_ServerSocket.cpp.

References m_impl.

void OW_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
allInterfaces do we listen on all interfaces?
Exceptions:
SocketException 

Definition at line 75 of file OW_ServerSocket.cpp.

References m_impl.

void OW_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
allInterfaces do we listen on all interfaces?
Exceptions:
SocketException 

Definition at line 68 of file OW_ServerSocket.cpp.

References m_impl.

SocketHandle_t OW_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 OW_ServerSocket.cpp.

References m_impl.

SocketAddress OW_NAMESPACE::ServerSocket::getLocalAddress  ) 
 

Return the address of the local host.

Returns:
an SocketAddress representing the local node

Definition at line 96 of file OW_ServerSocket.cpp.

References m_impl.

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

Implements OW_NAMESPACE::SelectableIFC.

Definition at line 108 of file OW_ServerSocket.cpp.

References m_impl.


Member Data Documentation

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

Definition at line 128 of file OW_ServerSocket.hpp.

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


The documentation for this class was generated from the following files:
Generated on Thu Feb 9 09:14:52 2006 for openwbem by  doxygen 1.4.6