1 #ifndef muxshmem_HEADER_GUARD
2 #define muxshmem_HEADER_GUARD
49 virtual void clientClose();
53 virtual void put(std::vector<uint8_t> &inp_payload,
void* meta_);
54 virtual void put(uint8_t* buf_,
void* meta_);
74 void serverPushMuxFrame(
MuxFrame *f);
79 PyObject* clientPullPy();
A file descriptor for running select and poll with shmem ring buffers.
Definition: sharedmem.h:56
Definition: muxshmem.h:66
Definition: muxshmem.h:39
virtual std::size_t getSize()
Client: return metadata = the size of the payload (not the maximum size). Uses SharedMemSegment::getM...
Definition: muxshmem.cpp:50
virtual void put(std::vector< uint8_t > &inp_payload, void *meta_)
typecast void to std::size_t
Definition: muxshmem.cpp:54
virtual void copyMetaTo(void *meta_)
Dereference metadata pointer correctly and copy the contents from this memory segment's metadata.
virtual void serverInit()
Uses shmem_open with write rights. used by the constructor if is_server=true. Init with correct metad...
virtual void copyMetaFrom(void *meta_)
Dereference metadata pointer correctly and copy the contents into this memory segment's metadata.
virtual bool clientInit()
Uses shmem_open with read-only rights. Init with correct metadata serialization.
virtual void serverClose()
Erases the shmem segment. used by the constructor if is_server=true.
Definition: muxshmem.h:85
virtual void go(Frame *frame)
Does the actual filtering/modification to the Frame. Define in subclass.
Definition: muxshmem.cpp:214
The mother class of all frame filters! FrameFilters are used to create "filter chains".
Definition: framefilter.h:44
Frame: An abstract queueable class.
Definition: frame.h:112
A muxed packet (in some container format)
Definition: frame.h:220
Interprocess shared memory ring buffer synchronized with posix semaphores.
Definition: sharedmem.h:226
int mstimeout
Semaphore timeout in milliseconds.
Definition: sharedmem.h:247
bool is_server
Are we on the server side or not?
Definition: sharedmem.h:248
Handles a shared memory segment with metadata (the segment size)
Definition: sharedmem.h:85
std::string name
Name to identify the posix objects.
Definition: sharedmem.h:115
std::size_t n_bytes
Maximum size of the payload (this much is reserved)
Definition: sharedmem.h:125
bool is_server
Client or server process?
Definition: sharedmem.h:118
Posix shared memory segment server/client management, shared memory ring buffer synchronized using po...