Yagl::BiDirectionalConnectionReceiver Class Reference

#include <bidirectionalconnectionreceiver.h>

List of all members.

Public Member Functions

 BiDirectionalConnectionReceiver ()
 Constructor.
virtual ~BiDirectionalConnectionReceiver ()
 Destructor.
void pushBiDirectionalConnection (BiDirectionalConnection *connection)
 pushes a BiDirectionalConnection to the connection list
BiDirectionalConnectionpopBiDirectionalConnection ()
 pops the first Connection from the list and returns it
virtual void receivedConnection ()
 gets called when a Connection was received

Protected Member Functions

 BiDirectionalConnectionReceiver (const BiDirectionalConnectionReceiver &receiver)

Protected Attributes

std::list< BiDirectionalConnection * > connections_
 stores all pushed Connections
Mutex connections_list_lock_
 mutex for locking the connection list


Detailed Description

BiDirectionalConnectionReceiver This class will be used do store incoming Connections that were detected by a ListeningConnection. This class is threadsafe
See also:
ListeningConnection::registerBiDirectionalConnectionReceiver( )


Constructor & Destructor Documentation

Yagl::BiDirectionalConnectionReceiver::BiDirectionalConnectionReceiver const BiDirectionalConnectionReceiver receiver  )  [protected]
 

hidden copyconstructor

Yagl::BiDirectionalConnectionReceiver::BiDirectionalConnectionReceiver  ) 
 

Constructor.

nothing happening in there

virtual Yagl::BiDirectionalConnectionReceiver::~BiDirectionalConnectionReceiver  )  [inline, virtual]
 

Destructor.

note that the stored connections will not be destroyed in the destructor this is done in the destroyAllBiDirectionalConnections method of the used NetDevice implementation ( SockNetDevice for example )

See also:
SockNetDevice::destroyAllBiDirectionalConnections( )


Member Function Documentation

BiDirectionalConnection* Yagl::BiDirectionalConnectionReceiver::popBiDirectionalConnection  ) 
 

pops the first Connection from the list and returns it

This method will pop the first connection in the connection list this class holds internally. this process is threadsafe so it can be used in concurrent scenarios.

void Yagl::BiDirectionalConnectionReceiver::pushBiDirectionalConnection BiDirectionalConnection connection  ) 
 

pushes a BiDirectionalConnection to the connection list

This method will push a connection to the end of the connection list this class holds internally. this process is threadsafe so it can be used in concurrent scenarios too, one of them being the listen method of ListeningConnection

See also:
ListeningConnection::listen( )

virtual void Yagl::BiDirectionalConnectionReceiver::receivedConnection  )  [virtual]
 

gets called when a Connection was received

this can be overwritten when a class inherits from the receiver for passing connections around automatically. see MessageReceiver for another example of this mechanims


The documentation for this class was generated from the following file:
Generated on Tue Jan 10 15:42:38 2006 for YAGL - yet another gameprogramming library by  doxygen 1.4.5