Changeset 5630 in orxonox.OLD for branches/network/src/lib/network/network_socket.h
- Timestamp:
- Nov 18, 2005, 2:21:30 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/network/src/lib/network/network_socket.h
r5628 r5630 8 8 #define _NETWORK_SOCKET 9 9 10 //if you want to use outgoing buffer define _USE_OUTGOING_BUFFER 11 #define _USE_OUTGOING_BUFFER 12 10 13 #define _INCOMING_BUFFER_SIZE 10240 14 #define _OUTGOING_BUFFER_SIZE 302400 11 15 #define _LOCAL_BUFFER_SIZE 1024 16 //sleep if incoming buffer is full 12 17 #define _MSECONDS_SLEEP_FULL_BUFFER 10 18 //sleep if outgoing buffer is empty 19 #define _MSECONDS_SLEEP_EMPTY_BUFFER 10 13 20 14 21 /* contains memmove and memcpy */ … … 36 43 // UDPsocket udpSocket; 37 44 38 byte buf[_INCOMING_BUFFER_SIZE]; 39 int bufferlength; 45 byte incomingBuffer[_INCOMING_BUFFER_SIZE]; 46 #ifdef _USE_OUTGOING_BUFFER 47 byte outgoingBuffer[_OUTGOING_BUFFER_SIZE]; 48 #endif 49 int incomingBufferLength; 50 #ifdef _USE_OUTGOING_BUFFER 51 int outgoingBufferLength; 52 #endif 40 53 41 SDL_mutex * mutex; 42 SDL_mutex * socketmutex; 54 SDL_mutex * incomingBufferMutex; 55 #ifdef _USE_OUTGOING_BUFFER 56 SDL_mutex * outgoingBufferMutex; 57 #endif 58 SDL_mutex * socketMutex; 43 59 bool terminateThread; 44 60 45 61 static int thread_listen(void * data); 46 62 static int thread_read(void * data); 63 #ifdef _USE_OUTGOING_BUFFER 64 static int thread_write(void * data); 65 #endif 66 67 bool _isListening; 47 68 48 69 public:
Note: See TracChangeset
for help on using the changeset viewer.