Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

buffer.h

Go to the documentation of this file.
00001 
00002 
00007 #ifndef BUFFER_H
00008 #define BUFFER_H
00009 
00010 #include "protocol.h"
00011 #include <pthread.h>
00012 #include <queue>
00013 
00014 class Buffer    {
00015     public:
00017 
00020     Buffer ( int checkSleep = 10000 );
00022     ~Buffer ();
00023 
00025 
00028     void    write (packet* pak);
00030 
00033     packet* read ();
00034 
00036 
00039     bool    isEmpty ();
00040 
00041     private:
00042 
00043     int checkSleep; 
00044     pthread_mutex_t buf_lock; 
00045     pthread_mutex_t buf_waitlock; 
00046     queue<packet*>  intBuffer; 
00047 };
00048 
00049 #endif

Generated at Sat May 13 13:50:17 2000 for 3Dsia by doxygen 1.1.2 written by Dimitri van Heesch, © 1997-2000