#include <P_UDPNet.h>
Public Member Functions | |
PacketQueue () | |
virtual | ~PacketQueue () |
void | init (void) |
void | addPacket (UDPPacketInternal *e, ink_hrtime now=0) |
UDPPacketInternal * | firstPacket (ink_hrtime t) |
UDPPacketInternal * | getFirstPacket () |
int | size () |
bool | IsCancelledPacket (UDPPacketInternal *p) |
void | FreeCancelledPackets (int numSlots) |
void | advanceNow (ink_hrtime t) |
UDPPacketInternal * | dequeue_ready (ink_hrtime t) |
void | check_ready (ink_hrtime now) |
ink_hrtime | earliest_timeout () |
Data Fields | |
int | nPackets |
ink_hrtime | lastPullLongTermQ |
Queue< UDPPacketInternal > | longTermQ |
Queue< UDPPacketInternal > | bucket [N_SLOTS] |
ink_hrtime | delivery_time [N_SLOTS] |
int | now_slot |
Definition at line 66 of file P_UDPNet.h.
PacketQueue::PacketQueue | ( | ) | [inline] |
Definition at line 69 of file P_UDPNet.h.
References init(), and lastPullLongTermQ.
virtual PacketQueue::~PacketQueue | ( | ) | [inline, virtual] |
Definition at line 76 of file P_UDPNet.h.
void PacketQueue::addPacket | ( | UDPPacketInternal * | e, | |
ink_hrtime | now = 0 | |||
) | [inline] |
Definition at line 99 of file P_UDPNet.h.
References bucket, UDPPacketInternal::delivery_time, delivery_time, Queue< C, L >::enqueue(), UDPPacketInternal::free(), UDPPacketInternal::in_heap, UDPPacketInternal::in_the_priority_queue, ink_assert, IsCancelledPacket(), longTermQ, N_SLOTS, now_slot, and nPackets.
Referenced by advanceNow(), and UDPQueue::service().
void PacketQueue::advanceNow | ( | ink_hrtime | t | ) | [inline] |
Definition at line 192 of file P_UDPNet.h.
References addPacket(), bucket, Debug, delivery_time, Queue< C, L >::dequeue(), Queue< C, L >::enqueue(), init(), ink_assert, ink_hrtime_to_msec(), lastPullLongTermQ, longTermQ, N_SLOTS, now_slot, SLOT_TIME, and SLOT_TIME_MSEC.
Referenced by dequeue_ready(), UDPQueue::SendPackets(), and UDPQueue::service().
void PacketQueue::check_ready | ( | ink_hrtime | now | ) | [inline] |
Definition at line 253 of file P_UDPNet.h.
UDPPacketInternal* PacketQueue::dequeue_ready | ( | ink_hrtime | t | ) | [inline] |
Definition at line 241 of file P_UDPNet.h.
References advanceNow(), bucket, Queue< C, L >::dequeue(), UDPPacketInternal::in_the_priority_queue, ink_assert, and now_slot.
Referenced by getFirstPacket().
ink_hrtime PacketQueue::earliest_timeout | ( | ) | [inline] |
Definition at line 258 of file P_UDPNet.h.
References bucket, delivery_time, and now_slot.
UDPPacketInternal* PacketQueue::firstPacket | ( | ink_hrtime | t | ) | [inline] |
Definition at line 143 of file P_UDPNet.h.
References bucket, delivery_time, DLL< C, L >::head, and now_slot.
Referenced by UDPQueue::SendPackets().
void PacketQueue::FreeCancelledPackets | ( | int | numSlots | ) | [inline] |
Definition at line 170 of file P_UDPNet.h.
References bucket, Queue< C, L >::dequeue(), dequeue(), Queue< C, L >::enqueue(), UDPPacketInternal::free(), IsCancelledPacket(), N_SLOTS, and now_slot.
Referenced by UDPQueue::SendPackets().
UDPPacketInternal* PacketQueue::getFirstPacket | ( | ) | [inline] |
Definition at line 152 of file P_UDPNet.h.
References dequeue_ready(), and nPackets.
Referenced by UDPQueue::SendPackets().
void PacketQueue::init | ( | void | ) | [inline] |
Definition at line 86 of file P_UDPNet.h.
References delivery_time, ink_get_hrtime_internal(), N_SLOTS, and now_slot.
Referenced by advanceNow(), and PacketQueue().
bool PacketQueue::IsCancelledPacket | ( | UDPPacketInternal * | p | ) | [inline] |
Definition at line 164 of file P_UDPNet.h.
References UDPPacketInternal::conn, UDPConnection::GetSendGenerationNumber(), UDPPacketInternal::reqGenerationNum, and UDPConnection::shouldDestroy().
Referenced by addPacket(), and FreeCancelledPackets().
int PacketQueue::size | ( | ) | [inline] |
Definition at line 158 of file P_UDPNet.h.
References ink_assert, and nPackets.
Queue<UDPPacketInternal> PacketQueue::bucket[N_SLOTS] |
Definition at line 82 of file P_UDPNet.h.
Referenced by addPacket(), advanceNow(), dequeue_ready(), earliest_timeout(), firstPacket(), and FreeCancelledPackets().
ink_hrtime PacketQueue::delivery_time[N_SLOTS] |
Definition at line 83 of file P_UDPNet.h.
Referenced by addPacket(), advanceNow(), earliest_timeout(), firstPacket(), and init().
Definition at line 80 of file P_UDPNet.h.
Referenced by advanceNow(), and PacketQueue().
Definition at line 81 of file P_UDPNet.h.
Referenced by addPacket(), and advanceNow().
Definition at line 84 of file P_UDPNet.h.
Referenced by addPacket(), advanceNow(), dequeue_ready(), earliest_timeout(), firstPacket(), FreeCancelledPackets(), and init().
Definition at line 79 of file P_UDPNet.h.
Referenced by addPacket(), getFirstPacket(), and size().