GNet::ServerPeerHandle Class Reference

A structure used in the implementation of GNet::Server. More...

#include <gserver.h>

List of all members.

Public Member Functions

 ServerPeerHandle ()
 Default constructor.
void set (ServerPeer *p)
 Sets the pointer.
void reset ()
 Resets the pointer.
ServerPeerpeer ()
 Returns the pointer.
ServerPeerold ()
 Returns the pointer value before it was reset().


Detailed Description

A structure used in the implementation of GNet::Server.

The server holds a list of handles which refer to all its peer objects. When a peer object deletes itself it resets the handle, without changing the server's list. The server uses its list to delete all peer objects from within its destructor. The server does garbage collection occasionally, deleting handles which have been reset.

Definition at line 53 of file gserver.h.


Constructor & Destructor Documentation

GNet::ServerPeerHandle::ServerPeerHandle (  ) 

Default constructor.

Definition at line 303 of file gserver.cpp.


Member Function Documentation

void GNet::ServerPeerHandle::set ( ServerPeer p  ) 

Sets the pointer.

Definition at line 324 of file gserver.cpp.

void GNet::ServerPeerHandle::reset (  ) 

Resets the pointer.

Definition at line 309 of file gserver.cpp.

Referenced by GNet::ServerPeer::~ServerPeer().

GNet::ServerPeer * GNet::ServerPeerHandle::peer (  ) 

Returns the pointer.

Definition at line 314 of file gserver.cpp.

GNet::ServerPeer * GNet::ServerPeerHandle::old (  ) 

Returns the pointer value before it was reset().

Used in debugging.

Definition at line 319 of file gserver.cpp.


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

Generated on Fri Apr 18 15:56:13 2008 for E-MailRelay by  doxygen 1.5.5