Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

lfc::SocketServer Class Reference

Inheritance diagram for lfc::SocketServer::

lfc::Object lfc::_Server List of all members.

Public Types

enum  State { stOpen, stClosed }
 see Socket::State. More...


Public Methods

 SocketServer () throw ()
 creates a SocketServer that doesn't do anything. More...

 SocketServer (Word port, Socket::SocketType type=Socket::stStream)
 creates a SocketServer and makes it listen on localhost. More...

 SocketServer (string service, Socket::SocketType type=Socket::stStream)
 creates a SocketServer and makes it listen on localhost. More...

virtual ~SocketServer () throw ()
virtual void listen (Word port, Socket::SocketType type=Socket::stStream)
 complementary to the corresponding constructor. More...

virtual void listen (string service, Socket::SocketType type=Socket::stStream)
 complementary to the corresponding constructor. More...

virtual void close ()
 closes the SocketServer
Exceptions:
SocketException  .
More...


virtual State state () const throw ()
 whether this Socket is open or closed. More...


Protected Methods

virtual pal::sockets::Handle accept ()
 gets a connection. More...

virtual void testState (State state, string location) const
 asserts that the current SocketServer state is the one we think it is. More...


Protected Attributes

pal::sockets::Handle m_handle
State m_state
 current state of the SocketServer, see SocketServer::State. More...


Friends

class Socket

Member Enumeration Documentation

enum lfc::SocketServer::State
 

see Socket::State.

Enumeration values:
stOpen 
stClosed 


Constructor & Destructor Documentation

lfc::SocketServer::SocketServer   throw ()
 

creates a SocketServer that doesn't do anything.

lfc::SocketServer::SocketServer Word    port,
Socket::SocketType    type = Socket::stStream
 

creates a SocketServer and makes it listen on localhost.

Parameters:
port  the port that this SocketServer opens for listening on localhost
type  see Socket::SocketType
Exceptions:
SocketException 

lfc::SocketServer::SocketServer string    service,
Socket::SocketType    type = Socket::stStream
 

creates a SocketServer and makes it listen on localhost.

Parameters:
service  the service that this SocketServer opens for listening on localhost
type  see Socket::SocketType
See also:
Socket::connect(string host, Word port,SocketType type = stStream)
Exceptions:
SocketException 

lfc::SocketServer::~SocketServer   throw () [virtual]
 


Member Function Documentation

void lfc::SocketServer::listen Word    port,
Socket::SocketType    type = Socket::stStream
[virtual]
 

complementary to the corresponding constructor.

Parameters:
port  the port that this SocketServer opens for listening on localhost
type  see Socket::SocketType
Exceptions:
SocketException 
See also:
SocketServer::SocketServer(Word port, Socket::SocketType type = Socket::stStream)

void lfc::SocketServer::listen string    service,
Socket::SocketType    type = Socket::stStream
[virtual]
 

complementary to the corresponding constructor.

Parameters:
service  the service that this SocketServer opens for listening on localhost
type  see Socket::SocketType
Exceptions:
SocketException 
See also:
SocketServer::SocketServer(string service, Socket::SocketType type = Socket::stStream)
Exceptions:
SocketException 

void lfc::SocketServer::close   [virtual]
 

closes the SocketServer

Exceptions:
SocketException  .

virtual State lfc::SocketServer::state   const throw () [inline, virtual]
 

whether this Socket is open or closed.

pal::sockets::Handle lfc::SocketServer::accept   [protected, virtual]
 

gets a connection.

Returns:
the low-leve handle of the socket trying to connect
Exceptions:
SocketException 

virtual void lfc::SocketServer::testState State    state,
string    location
const [inline, protected, virtual]
 

asserts that the current SocketServer state is the one we think it is.

Parameters:
state  the state we think the Socket should be in at the time of calling the function
location  this is only used if the assertion fails; set it to anything you want to reflect where you were in the program when the assertion failed
Exceptions:
SocketException 


Friends And Related Function Documentation

friend class Socket [friend]
 


Member Data Documentation

pal::sockets::Handle lfc::SocketServer::m_handle [protected]
 

State lfc::SocketServer::m_state [protected]
 

current state of the SocketServer, see SocketServer::State.


The documentation for this class was generated from the following files:
Generated on Fri Jan 25 03:13:55 2002 for LFC2 by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001