28#include <cx/net/net_shared.h>
34typedef struct NetPool_WeakRef NetPool_WeakRef;
37#define _sti_NetPool _sti_object
38#define SType_NetPool NetPool*
39#define STStorageType_NetPool NetPool*
40#define STypeArg_NetPool(type, val) stgeneric(object, (ObjInst*)objInstCheckClass(NetPool, val))
41#define STypeArgPtr_NetPool(type, val) (stgeneric*)objInstCheckClassPtr(NetPool, val)
42#define STypeCheckedArg_NetPool(type, val) stType(type), stArg(type, val)
43#define STypeCheckedPtrArg_NetPool(type, val) stType(type), stArgPtr(type, val)
70#define NetPool(inst) objInstCheckClass(NetPool, inst)
71#define NetPoolNone ((NetPool*)NULL)
73typedef struct NetPool_WeakRef {
76 void* _is_NetPool_WeakRef;
77 void* _is_ObjInst_WeakRef;
82#define NetPool_WeakRef(inst) objWeakRefCheckClass(NetPool, inst)
93#define netpoolCreate(conf) NetPool_create(conf)
110#define netpoolAllocHeader(self) NetPool_allocHeader(NetPool(self))
132#define netpoolAllocMsg(self) NetPool_allocMsg(NetPool(self))
134_At_(*msg, _Pre_notnull_ _Post_null_)
void NetPool_freeMsg(_In_
NetPool* self, _Inout_
NetMessage** msg);
145#define netpoolFreeMsg(self, msg) NetPool_freeMsg(NetPool(self), msg)
157#define netpoolFreeMsgQueue(self, mq) NetPool_freeMsgQueue(NetPool(self), mq)
Thread-safe pool of fixed-size buffers.
#define saDeclarePtr(name)
#define _objfactory_guaranteed
CX Struct System - Introspectable, serializable POD structures in C.
CX Object System - Object-oriented programming in C.
A received packet, as delivered to a handler.
Simple intrusive FIFO of NetMessage, linked through NetMessage::next.
Shared, capped pool of network message buffers and headers.
BufPool msgbuf
Pooled receive buffers, capped at queue creation.
PrQueue msghdr
Free NetMessage headers, so the steady-state packet path allocates nothing.