TC::Net::SocketServer Class Reference
[Networking]

class for running as net server which can communicate with any number of clients on a specified port. More...

#include <TCNetSocketServer.h>

Inheritance diagram for TC::Net::SocketServer:

Inheritance graph
[legend]
Collaboration diagram for TC::Net::SocketServer:

Collaboration graph
[legend]

List of all members.

Classes

class  DataReceiver
 Interface for retrieving incoming data on an socked. More...

Public Types

typedef SharedPtr< DataReceiverDataReceiverPtr
 typedef for a data receiver pointer

Public Member Functions

virtual ~SocketServer ()
 deletes the object and stops the server
virtual void Start (bool wait_started)=0
 Starts the server by setting the stop variable to false.
virtual void Stop (bool wait_stopped)=0
 stops the server by setting the stop variable to false
virtual bool AddSocket (SocketPtr socket, DataReceiverPtr data_receiver)=0
 Add a socket to the server for selection of new data.
virtual bool RemoveSocket (SocketPtr socket)=0
 Remove a socket to the server for selection of new data.


Detailed Description

class for running as net server which can communicate with any number of clients on a specified port.

Connections can be made with objects based on TCNetClient

Definition at line 60 of file TCNetSocketServer.h.


Member Typedef Documentation

typedef for a data receiver pointer

Definition at line 72 of file TCNetSocketServer.h.


Constructor & Destructor Documentation

virtual TC::Net::SocketServer::~SocketServer (  )  [inline, virtual]

deletes the object and stops the server

See also:
TC::Net::SocketServer::Stop()

Definition at line 79 of file TCNetSocketServer.h.


Member Function Documentation

virtual void TC::Net::SocketServer::Start ( bool  wait_started  )  [pure virtual]

Starts the server by setting the stop variable to false.

Parameters:
wait_started Wait until the server has started

virtual void TC::Net::SocketServer::Stop ( bool  wait_stopped  )  [pure virtual]

stops the server by setting the stop variable to false

Parameters:
wait_stopped Wait until the server has stopped

virtual bool TC::Net::SocketServer::AddSocket ( SocketPtr  socket,
DataReceiverPtr  data_receiver 
) [pure virtual]

Add a socket to the server for selection of new data.

Parameters:
socket The socket to add on which to listen for new data
data_receiver The data receiver which is informed if there is new incoming data
Returns:
true is success

virtual bool TC::Net::SocketServer::RemoveSocket ( SocketPtr  socket  )  [pure virtual]

Remove a socket to the server for selection of new data.

Parameters:
socket The socket to remove
Returns:
true is success


The documentation for this class was generated from the following file:

Copyright (c) Thomas Goessler 2003 - 2008