hmbdc
simplify-high-performance-messaging-programming
|
if a specific hmbdc network transport (for example tcpcast, rmcast, and rnetmap) supports message with memory attachment, the message needs to be derived from this base - as the FIRST base, so it can be handled properly by the hmbdc network transport when sending and receiving it More...
#include <Message.hpp>
Public Member Functions | |
hasMemoryAttachment () | |
default ctor More... | |
hasMemoryAttachment (char const *fileName) | |
file mapped memory More... | |
size_t | map (char const *fileName) |
map this object's attached memory to a file More... | |
void | unmap () |
does the reverse of map More... | |
if a specific hmbdc network transport (for example tcpcast, rmcast, and rnetmap) supports message with memory attachment, the message needs to be derived from this base - as the FIRST base, so it can be handled properly by the hmbdc network transport when sending and receiving it
user on the sending side cannot directly free the attachment, instead the user can provide a callback func and hmbdc will call it - the default callback function is to call free on the attachment
|
inline |
default ctor
will allocate and release thru heap
|
inline |
file mapped memory
fileName | file name to map |
size_t hmbdc::app::hasMemoryAttachment::map | ( | char const * | fileName | ) |
map this object's attached memory to a file
the afterConsumedCleanupFunc is automatically set to do the unmap
fileName | file to map into memory |
|
inline |
does the reverse of map
pointing to a func that handles cleaning up the attachment it is automatically set, but user can change it as desire when the sending side is done with this message, this is called by hmbdc automatically. however, this is not called on the recv side since only the user code knows when to call it