Public Member Functions | List of all members
GNet::ServerPeerHandle Class Reference

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

#include <gserver.h>

Public Member Functions

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

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 54 of file gserver.h.

Constructor & Destructor Documentation

GNet::ServerPeerHandle::ServerPeerHandle ( )

Default constructor.

Definition at line 328 of file gserver.cpp.

Member Function Documentation

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

Returns the pointer value before it was reset().

Used in debugging.

Definition at line 344 of file gserver.cpp.

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

Returns the pointer.

Definition at line 339 of file gserver.cpp.

void GNet::ServerPeerHandle::reset ( )

Resets the pointer.

Definition at line 334 of file gserver.cpp.

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

Sets the pointer.

Definition at line 349 of file gserver.cpp.


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