8 #ifndef vlAsyncSocket_H_
9 #define vlAsyncSocket_H_
26 #ifdef DtUSE_UTILITIES_NAMESPACE
27 namespace DtUSE_UTILITIES_NAMESPACE
47 size_t size()
const {
return mySize;}
48 char *
data() {
return &myData[0];}
96 virtual int sendTo(caddr_t packet,
size_t size,
DtIpv4Addr addr);
100 virtual int directSendTo(caddr_t packet,
size_t size,
DtIpv4Addr addr);
103 virtual bool usingAsyncSend()
const;
104 virtual void setUsingAsyncSend(
bool b);
107 virtual bool usingAsyncReceive()
const;
108 virtual void setUsingAsyncReceive(
bool b);
114 virtual int recvFromNet(caddr_t *buffptr);
120 virtual void workerSendThread();
123 virtual void workerReceiveThread();
127 virtual void processSendQueue();
130 virtual void processReceiveQueue();
136 static unsigned long runReceive(
void* usr_data);
137 static unsigned long runSend(
void *user_data);
139 static void* runReceive(
void* usr_data);
140 static void* runSend(
void* usr_data);
142 static void setQueueTimeout(
double new_time_out);
143 static double queueTimeout();
169 HANDLE mySendThreadHandle;
170 HANDLE myReceiveThreadHandle;
172 HANDLE myReceiveEvent;
184 theQueueTimeout = time_out;
190 return theQueueTimeout;
195 return myUseAsyncSendFlag;
201 myUseAsyncSendFlag = b;
206 return myUseAsyncReceiveFlag;
212 myUseAsyncReceiveFlag = b;
215 #ifdef DtUSE_UTILITIES_NAMESPACE