00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef PENDINGACK_H
00024 #define PENDINGACK_H
00025
00026
00027
00028
00029
00030
00031 template<class PacketType, class SocketType>
00032 class PendingAck
00033 {
00034 public:
00035 unsigned int seq;
00036 unsigned char pri;
00037 unsigned int user_id;
00038
00039 unsigned int timeout;
00040 bool acked;
00041 unsigned int queue_time;
00042 unsigned int sent_time;
00043 PacketType *packet;
00044
00045 public:
00046 PendingAck(unsigned int seq, unsigned char pri, unsigned int uid, unsigned int timeout, PacketType *packet);
00047 ~PendingAck();
00048
00049 public:
00050 inline void setQueueTime(unsigned int t) { queue_time = t; };
00051 inline void setSentTime(unsigned int t) { sent_time = t; };
00052
00053 };
00054
00055
00056
00057 template<class PacketType, class SocketType>
00058 PendingAck<PacketType, SocketType>::PendingAck(
00059 unsigned int seq,
00060 unsigned char pri,
00061 unsigned int uid,
00062 unsigned int timeout,
00063 PacketType * packet )
00064 : seq(seq),
00065 pri(pri),
00066 user_id(uid),
00067 timeout(timeout),
00068 acked(false),
00069 packet(packet)
00070 {
00071 }
00072
00073 template<class PacketType, class SocketType>
00074 PendingAck<PacketType, SocketType>::~PendingAck()
00075 {
00076 }
00077
00078 #endif