Implement shmem msg zero-copy

This commit is contained in:
Alexey Rybalchenko
2021-07-14 10:46:12 +02:00
committed by Dennis Klein
parent c57410b820
commit bce380d871
7 changed files with 333 additions and 100 deletions

View File

@@ -47,6 +47,10 @@ struct Message
TransportFactory* GetTransport() { return fTransport; }
void SetTransport(TransportFactory* transport) { fTransport = transport; }
/// Copy the message buffer from another message
/// Transport may choose not to physically copy the buffer, but to share across the messages.
/// Modifying the buffer after a call to Copy() is undefined behaviour.
/// @param msg message to copy the buffer from.
virtual void Copy(const Message& msg) = 0;
virtual ~Message() = default;