8 #ifndef FACEBOOK_NETWORK_PACKAGED_TCP_SERVER_H
9 #define FACEBOOK_NETWORK_PACKAGED_TCP_SERVER_H
unsigned int ConnectionId
Definition of a connection id.
Definition: ConnectionOrientedServer.h:34
This class implements a memory block.
Definition: PackagedSocket.h:38
This class is the base class for all packaged sockets.
Definition: PackagedSocket.h:31
std::queue< MemoryBlock > MemoryBlockQueue
Definition of a queue holding memory blocks.
Definition: PackagedSocket.h:133
Definition of a container.
Definition: PackagedTCPServer.h:35
MemoryBlock currentMemory_
The memory block to be filled.
Definition: PackagedTCPServer.h:42
MemoryBlockQueue memoryQueue_
The queue holding all memory blocks recently received and not yet process.
Definition: PackagedTCPServer.h:39
MemoryBlock currentPackageHeaderMemory_
The memory block for the package header.
Definition: PackagedTCPServer.h:45
This class implements a TCP server with internal package handling.
Definition: PackagedTCPServer.h:28
ConnectionMemoryMap connectionMemoryMap_
The map mapping connection ids to ConnectionMemory objects.
Definition: PackagedTCPServer.h:82
~PackagedTCPServer() override=default
Destructs a TCP server.
void onReceived(const ConnectionId connectionId, const void *data, const size_t size) override
Internal event function for received data.
PackagedTCPServer()=default
Creates a new TCP server.
std::unordered_map< ConnectionId, ConnectionMemory > ConnectionMemoryMap
Definition of an unordered map mapping connection ids to ConnectionMemory objects.
Definition: PackagedTCPServer.h:51
size_t onSend(const ConnectionId connectionId, const void *data, const size_t size) override
Internal event function to send data.
This class implements a TCP server.
Definition: TCPServer.h:25
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15