90 void operator delete(
void* d) {
if(d)
::baFree(d); }
91 void *
operator new(size_t,
void *place) {
return place; }
92 void operator delete(
void*,
void *) { }
140 void run(S32 timeout=-1);
152#ifndef SoDisp_destructor
153#define SoDisp_destructor(o)
159#define SoDisp_activateSend(o, con)
160#define SoDisp_deactivateSend(o, con)
166BA_API
void SoDisp_run(
SoDisp* o, S32 timeout);
168union SIGNAL* SoDisp_receive(
SoDisp* o, S32 time, SIGSELECT* sel);
170#define SoDisp_getMutex(o) ((o) ? ((o)->mutex) : 0)
171#define SoDisp_mutexSet(o) ThreadMutex_set((o)->mutex)
172#define SoDisp_mutexRelease(o) ThreadMutex_release((o)->mutex)
173#define SoDisp_setExit(o) (o)->doExit=TRUE
180 SoDisp_constructor(
this, mutex); }
181inline void SoDisp::addConnection(
SoDispCon* con) {
182 SoDisp_addConnection(
this, con); }
183inline void SoDisp::activateRec(
SoDispCon* con) {
184 SoDisp_activateRec(
this, con); }
185inline void SoDisp::deactivateRec(
SoDispCon* con) {
186 SoDisp_deactivateRec(
this, con); }
187inline void SoDisp::activateSend(
SoDispCon* con) {
188 SoDisp_activateSend(
this, con); }
189inline void SoDisp::deactivateSend(
SoDispCon* con) {
190 SoDisp_deactivateSend(
this, con); }
191inline void SoDisp::removeConnection(
SoDispCon* con) {
192 SoDisp_removeConnection(
this, con); }
194 SoDisp_run(
this, timeout); }
196 return this->mutex; }
198inline union SIGNAL* SoDisp::receive(S32 time, SIGSELECT* sel) {
199 return SoDisp_receive(
this, time, sel); }
207void SoDisp_setTimeout(
208 SoDisp* o,
BaTime t,
void (*cb)(
void*
object),
void*
object);
void * baMalloc(size_t size)
Returns pointer to uninitialized newly-allocated space for an object of size "size",...
void baFree(void *p)
Deallocates space to which it points.
S64 BaTime
An arithmetic type representing calendar time with epoch of 1970-01-01 00:00:10 GMT – i....
Definition: GenPrimT.h:93
The Web Server.
Definition: HttpServer.h:2864
Contains information about the physical socket connection.
Definition: SoDispCon.h:112
The SoDisp dispatches any socket connection that contains data by calling the SoDispCon::execute memb...
Definition: SoDisp.h:86
void mutexRelease()
Releases the mutex if this is the last 'pop'.
Definition: SoDisp.h:202
void run(S32 timeout=-1)
Call the socket dispatcher loop, which dispatches HTTP requests.
Definition: SoDisp.h:193
SoDisp(ThreadMutex *mutex)
The constructor.
Definition: SoDisp.h:179
void setExit()
The callbacks can force the dispatcher to exit the run method.
Definition: SoDisp.h:203
void mutexSet()
Lock the dispatcher thread.
Definition: SoDisp.h:201
ThreadMutex * getMutex()
Returns the SoDisp mutex.
Definition: SoDisp.h:195
A mutual exclusion class.
Definition: ThreadLib.h:186