95 void operator delete(
void* d) {
if(d)
::baFree(d); }
96 void *
operator new(size_t,
void *place) {
return place; }
97 void operator delete(
void*,
void *) { }
181#ifndef SoDisp_destructor
182#define SoDisp_destructor(o)
194#define SoDisp_activateSend(o, con)
195#define SoDisp_deactivateSend(o, con)
211union SIGNAL* SoDisp_receive(
SoDisp* o,
S32 time, SIGSELECT* sel);
215#define SoDisp_getMutex(o) ((o) ? ((o)->mutex) : 0)
218#define SoDisp_mutexSet(o) ThreadMutex_set((o)->mutex)
221#define SoDisp_mutexRelease(o) ThreadMutex_release((o)->mutex)
224#define SoDisp_setExit(o) (o)->doExit=TRUE
247 return this->mutex; }
249inline union SIGNAL* SoDisp::receive(
S32 time, SIGSELECT* sel) {
250 return SoDisp_receive(
this, time, sel); }
258void SoDisp_setTimeout(
259 SoDisp* o,
BaTime t,
void (*cb)(
void*
object),
void*
object);
BA_API void SoDisp_run(SoDisp *o, S32 timeout)
Run the generic socket dispatcher loop.
BA_API void SoDisp_activateSend(SoDisp *o, struct SoDispCon *con)
Enable send-ready events.
BA_API void SoDisp_activateRec(SoDisp *o, struct SoDispCon *con)
Enable receive events.
#define SoDisp_mutexRelease(o)
Release the configured mutex owned by this thread.
Definition: SoDisp.h:221
#define SoDisp_mutexSet(o)
Acquire the configured mutex; do not acquire recursively.
Definition: SoDisp.h:218
BA_API void SoDisp_constructor(SoDisp *o, ThreadMutex *mutex)
The constructor.
BA_API void SoDisp_removeConnection(SoDisp *o, struct SoDispCon *con)
Unregister a connection without closing or freeing it.
BA_API void SoDisp_deactivateRec(SoDisp *o, struct SoDispCon *con)
Disable receive events without closing or unregistering the connection.
struct SoDisp SoDisp
The SoDisp dispatches any socket connection that contains data by calling the SoDispCon::execute memb...
BA_API void SoDisp_deactivateSend(SoDisp *o, struct SoDispCon *con)
Disable send-ready events without closing or unregistering the connection.
#define SoDisp_setExit(o)
Definition: SoDisp.h:224
BA_API void SoDisp_addConnection(SoDisp *o, struct SoDispCon *con)
Register a connection without enabling events.
void * baMalloc(size_t size)
Allocate uninitialized storage using the target's configured allocator.
void baFree(void *p)
Release storage using the target's configured allocator.
int32_t S32
Signed 32-bit integer.
Definition: GenPrimT.h:85
S64 BaTime
An arithmetic type representing calendar time with epoch of 1970-01-01 00:00:00 UTC,...
Definition: GenPrimT.h:103
U8 BaBool
Boolean stored in an unsigned byte; FALSE is zero and TRUE is one.
Definition: GenPrimT.h:118
The Web Server.
Definition: HttpServer.h:3393
Contains information about the physical socket connection.
Definition: SoDispCon.h:120
The SoDisp dispatches any socket connection that contains data by calling the SoDispCon::execute memb...
Definition: SoDisp.h:91
void mutexRelease()
Release the mutex currently owned by this thread.
Definition: SoDisp.h:253
void run(S32 timeout=-1)
Run the generic socket dispatcher loop.
Definition: SoDisp.h:244
void activateRec(SoDispCon *con)
Enable receive events.
Definition: SoDisp.h:234
SoDisp(ThreadMutex *mutex)
The constructor.
Definition: SoDisp.h:230
void setExit()
Request that the current run loop exits after it regains control.
Definition: SoDisp.h:254
void activateSend(SoDispCon *con)
Enable send-ready events.
Definition: SoDisp.h:238
void addConnection(SoDispCon *con)
Register a connection without enabling events.
Definition: SoDisp.h:232
void mutexSet()
Lock the dispatcher thread.
Definition: SoDisp.h:252
void removeConnection(SoDispCon *con)
Unregister a connection without closing or freeing it.
Definition: SoDisp.h:242
ThreadMutex * getMutex()
Definition: SoDisp.h:246
void deactivateRec(SoDispCon *con)
Disable receive events without closing or unregistering the connection.
Definition: SoDisp.h:236
void deactivateSend(SoDispCon *con)
Disable send-ready events without closing or unregistering the connection.
Definition: SoDisp.h:240
A mutual exclusion class.
Definition: ThreadLib.h:196