Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

scim::SocketServer Class Reference
[Helper]

#include <scim_socket.h>

Inheritance diagram for scim::SocketServer:

Inheritance graph
[legend]
Collaboration diagram for scim::SocketServer:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 SocketServer (int max_clients=-1)
 SocketServer (const SocketAddress &address, int max_clients=-1)
 ~SocketServer ()
bool valid ()
bool create (const SocketAddress &address)
bool run ()
bool is_running () const
void shutdown ()
void close_connection (const Socket &socket)
int get_error_number () const
String get_error_message () const
int get_max_clients () const
void set_max_clients (int max_clients)
Connection signal_connect_accept (SocketServerSlotSocket *slot)
Connection signal_connect_receive (SocketServerSlotSocket *slot)
Connection signal_connect_exception (SocketServerSlotSocket *slot)

Detailed Description

class SocketServer provides basic operations to create a Socket Server, such as create, run etc.

Definition at line 275 of file scim_socket.h.


Constructor & Destructor Documentation

scim::SocketServer::SocketServer int  max_clients = -1  ) 
 

default constructor, do nothing.

scim::SocketServer::SocketServer const SocketAddress address,
int  max_clients = -1
 

constructor.

Parameters:
address create a server on this address.

scim::SocketServer::~SocketServer  ) 
 

destructor.


Member Function Documentation

bool scim::SocketServer::valid  ) 
 

test if the server is valid.

bool scim::SocketServer::create const SocketAddress address  ) 
 

create a socket on the address.

Parameters:
address the address to be listen.
Returns:
true if OK.

bool scim::SocketServer::run  ) 
 

run the server.

bool scim::SocketServer::is_running  )  const
 

check if the server is running.

void scim::SocketServer::shutdown  ) 
 

shutdown the server.

void scim::SocketServer::close_connection const Socket socket  ) 
 

close a connection.

int scim::SocketServer::get_error_number  )  const
 

get the number of the last occurred error.

Reimplemented from scim::Socket.

String scim::SocketServer::get_error_message  )  const
 

get the message of the last occurred error.

Reimplemented from scim::Socket.

int scim::SocketServer::get_max_clients  )  const
 

get the max number of clients.

void scim::SocketServer::set_max_clients int  max_clients  ) 
 

set the max number of clients.

Connection scim::SocketServer::signal_connect_accept SocketServerSlotSocket slot  ) 
 

connect a slot to accept signal, if a client connection is accepted, this signal will be emitted.

Connection scim::SocketServer::signal_connect_receive SocketServerSlotSocket slot  ) 
 

connect a slot to receive signal, if a client send data to server, this signal will be emitted.

Connection scim::SocketServer::signal_connect_exception SocketServerSlotSocket slot  ) 
 

connect a slot to exception signal, if a exception was occurred to a connection, this signal will be emitted.


The documentation for this class was generated from the following file:
Generated on Fri May 7 17:27:34 2004 for scim by doxygen 1.3.6