Main Page   Packages   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

TFTP_DataAck Class Reference

#include <TFTP_DataAck.hpp>

List of all members.

Public Methods

 TFTP_DataAck (ULONG blockNo)
virtual ~TFTP_DataAck ()
virtual void run ()

Private Attributes

ULONG blockNo
TFTP_Packetpacket


Constructor & Destructor Documentation

TFTP_DataAck::TFTP_DataAck ULONG    blk
 

Definition at line 6 of file TFTP_DataAck.cpp.

00007  : packet( NULL )
00008 {
00009   blockNo = blk;
00010    
00011   //  Basic_PThread::start();
00012 }

TFTP_DataAck::~TFTP_DataAck   [virtual]
 

Definition at line 37 of file TFTP_DataAck.cpp.

00038 {
00039   if ( this == NULL ) return;
00040   if ( packet != NULL )  delete packet;
00041 }


Member Function Documentation

void TFTP_DataAck::run   [virtual]
 

Definition at line 14 of file TFTP_DataAck.cpp.

Referenced by ACK_driver().

00015 {
00016   option.rwlock6_wait_queue.write();
00017   option.waitingAck_queue->setFirst();
00018   long rc = 0;
00019   while ( rc >= 0 ) {
00020 
00021     // Not Found = -1, Empty = -50, Invalid = -100 - position
00022     rc = option.waitingAck_queue->findID( blockNo );
00023     if ( rc >= 0 ) {
00024       packet = NULL;
00025       packet = option.waitingAck_queue->remove();
00026       //      option.windowsizeLeft++;
00027       if ( packet != NULL ) delete packet;
00028       packet = NULL;
00029     }
00030   }
00031 
00032   option.rwlock6_wait_queue.releaseWrite();
00033 
00034   // Thread loop exited anyway.
00035 }


Member Data Documentation

ULONG TFTP_DataAck::blockNo [private]
 

Definition at line 18 of file TFTP_DataAck.hpp.

TFTP_Packet* TFTP_DataAck::packet [private]
 

Definition at line 19 of file TFTP_DataAck.hpp.


The documentation for this class was generated from the following files:
Generated on Sun Oct 14 18:49:58 2001 for Standard J2K Library by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001