Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | Related Pages | Examples

Framework< PacketType, SocketType > Class Template Reference

The general interface for a framework. More...

#include <framework.h>

List of all members.

Public Member Functions

 Framework (const int listen_port)
virtual ~Framework ()
virtual void retransmitPacket (PacketType *packet)
 Will be called by the pendingacklist when ever we want to retransmit a packet.
void ackPacket (PacketType *p)
 This should send an AckPacket based on the packet.
virtual void addPendingAck (PacketType *packet, bool haslock)=0
 Called when we want to insert a pending ack into the pendingacklist.
virtual PacketType * deliverPacket (PacketType *p)=0
 This method should deliver the packet and return any buffered packets, waiting for this packet.
virtual bool isPacketReadyForDelivery (PacketType *packet)=0
 This method should test if a packet is in order, and if not buffer the packet for later delivery.
virtual void sentReliablePacket (PacketType *packet)=0
 This method will be called by the sender when ever it successfully sends a reliable packet to the socket.
virtual void addPluginSequenceNumber (PacketType *packet)=0
 This method should add a sequence number to the pluginpacket if it does not already have one.

Static Public Member Functions

static unsigned int currentTimeMillis ()

Protected Member Functions

unsigned int handleAckPacket (PacketType *packet, unsigned int userid)

Protected Attributes

int listen_port
 The port the framework listens on.
SocketType socket
 The socket used for sending/receiving.
PacketReceiver< PacketType,
SocketType > * 
 The receiving object, enqueues incomming packets.
Queue< PacketType > * inqueue
 All the incomming unprocessessed packets.
Queue< PacketType > * outqueue
 The queue of packets on their way out of the server.
PacketSender< PacketType,
SocketType > * 
 The Sending object, takes/waits from the outqueue.
PendingAckList< PacketType,
SocketType > * 
 A list of pending acknowledgements.

Detailed Description

template<class PacketType, class SocketType>
class Framework< PacketType, SocketType >

The general interface for a framework.

Lars Langer and Emanuel Greisen

Definition at line 58 of file framework.h.

The documentation for this class was generated from the following file:
Generated on Mon Feb 6 12:24:52 2006 for Ganef by  doxygen 1.4.4