Changeset 174 for code/branches/network/src/network/PacketBuffer.h
- Timestamp:
- Nov 6, 2007, 11:32:34 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/network/src/network/PacketBuffer.h
r173 r174 16 16 #include <queue> 17 17 #include <string> 18 #include <boost/bind.hpp> 19 #include <boost/thread/mutex.hpp> 20 #include <boost/thread/mutex.hpp> 21 22 //this is needed in order to make the packetbuffer threadsafe 23 boost::mutex networkPacketBufferMutex; 18 24 19 25 namespace network{ … … 32 38 public: 33 39 PacketBuffer(); 34 bool isLocked();35 40 bool isEmpty(); 41 bool isClosed(); 42 void setClosed(bool value); 43 void print(); 36 44 // pops a packet from the queue 37 PacketEnvelope *pop();45 PacketEnvelope pop(); 38 46 // pushs a packet to the queue 39 47 bool push(PacketEnvelope pck); 40 void print();41 48 private: 42 bool locked;43 49 QueueItem *first; 44 50 QueueItem *last; 51 bool closed; 52 53 //make it threadsafe 54 // boost::mutex mutex; 45 55 }; 46 56
Note: See TracChangeset
for help on using the changeset viewer.