activemq::network::ServerSocket Class Reference

#include <ServerSocket.h>

List of all members.

Public Types

typedef Socket::SocketHandle SocketHandle

Public Member Functions

 ServerSocket ()
virtual ~ServerSocket ()
virtual void bind (const char *host, int port) throw ( SocketException )
virtual void bind (const char *host, int port, int backlog) throw ( SocketException )
virtual Socketaccept () throw ( SocketException )
virtual void close () throw ( cms::CMSException )
virtual bool isBound () const

Static Protected Attributes

static StaticServerSocketInitializer staticSocketInitializer

Private Attributes

SocketHandle socketHandle

Classes

class  StaticServerSocketInitializer


Detailed Description

A server socket class (for testing purposes).


Member Typedef Documentation

typedef Socket::SocketHandle activemq::network::ServerSocket::SocketHandle
 


Constructor & Destructor Documentation

ServerSocket::ServerSocket  ) 
 

Constructor. Creates a non-bound server socket.

ServerSocket::~ServerSocket  )  [virtual]
 

Destructor. Releases socket handle if close() hasn't been called.


Member Function Documentation

Socket * ServerSocket::accept  )  throw ( SocketException ) [virtual]
 

Blocks until a client connects to the bound socket.

Returns:
new socket. Never returns NULL.

void ServerSocket::bind const char *  host,
int  port,
int  backlog
throw ( SocketException ) [virtual]
 

Bind and listen to given IP/dns and port.

Parameters:
host IP address or host name.
port TCP port between 1..655535
backlog Size of listen backlog.

void ServerSocket::bind const char *  host,
int  port
throw ( SocketException ) [virtual]
 

Bind and listen to given IP/dns and port.

Parameters:
host IP address or host name.
port TCP port between 1..655535

void ServerSocket::close  )  throw ( cms::CMSException ) [virtual]
 

Closes the server socket.

bool ServerSocket::isBound  )  const [virtual]
 

Returns:
true of the server socket is bound.


Member Data Documentation

SocketHandle activemq::network::ServerSocket::socketHandle [private]
 

ServerSocket::StaticServerSocketInitializer ServerSocket::staticSocketInitializer [static, protected]
 


The documentation for this class was generated from the following files:
Generated on Thu Aug 3 18:03:33 2006 for activemq-cpp by  doxygen 1.4.5