14#if !defined(_MEMORYREQUESTCONNECTION_H_)
15#define _MEMORYREQUESTCONNECTION_H_
22#define MEMORYREQUESTSERVER_INIT 1
72 bool connect(
const char* memoryName);
79 uint16
getRequestStatus(uint64
id, uint64& createdTime, uint64& lastUpdateTime);
100 std::map<uint64, DataMessage*> replyCache;
103 bool oneWaitingForQueue;
108 char* getQueueHeader(uint32 otherConID);
Static algorithms for request queues and the request-status map used by the shared-memory request/rep...
The central Psyclone data container: a self-contained binary message with typed, named user entries.
~MemoryRequestConnection()
bool replyToRequest(uint64 id, DataMessage *msg)
Server side: send the reply for id (copied).
bool setRequestStatus(uint64 id, uint16 status)
Server side: advance a request's status.
MemoryRequestConnection()
uint16 getRequestStatus(uint64 id, uint64 &createdTime, uint64 &lastUpdateTime)
Query a request's status.
DataMessage * waitForRequestReply(uint32 ms)
Wait for the reply to this connection's most recent request.
bool connect(const char *memoryName)
Attach to the named server segment and claim a connection slot.
bool shutdown()
Release the connection slot and detach.
uint64 makeRequest(DataMessage *msg)
Submit a request to the server.
DataMessage * waitForRequest(uint32 ms)
Server side: wait for the next incoming request.
Auto-reset notification event (condition variable style), optionally named for cross-process use.
Recursive mutual-exclusion lock, optionally named for cross-process use.