Rebel Fork Framework
|
#include <Urho3D/Network/MessageUtils.h>
Public Member Functions | |
MultiMessageWriter (AbstractConnection &connection, NetworkMessageId messageId, PacketTypeFlags packetType) | |
void | CompleteHeader () |
Complete shared header that is going to be sent for each individual message. Could be empty. | |
void | CompletePayload () |
Complete individual payload. Single message will contain one or more payloads. | |
VectorBuffer & | GetBuffer () |
ea::string * | GetDebugInfo () |
Private Member Functions | |
void | SendPreviousPayloads () |
Private Attributes | |
AbstractConnection & | connection_ |
VectorBuffer & | buffer_ |
ea::string & | debugInfo_ |
const NetworkMessageId | messageId_ |
const PacketTypeFlags | packetType_ |
ea::optional< unsigned > | headerSize_ |
unsigned | nextPayloadOffset_ {} |
unsigned | nextDebugInfoOffset_ {} |
Helper class to send multiple messages of the same type with the same common header. Messages are sent as soon as maximum packet size is reached. Message without payloads is not sent. Size of header and single payload should not exceed maximum message size.