Rebel Fork Framework
Urho3D::MultiMessageWriter Class Reference

#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.
 
VectorBufferGetBuffer ()
 
ea::string * GetDebugInfo ()
 

Private Member Functions

void SendPreviousPayloads ()
 

Private Attributes

AbstractConnectionconnection_
 
VectorBufferbuffer_
 
ea::string & debugInfo_
 
const NetworkMessageId messageId_
 
const PacketTypeFlags packetType_
 
ea::optional< unsigned > headerSize_
 
unsigned nextPayloadOffset_ {}
 
unsigned nextDebugInfoOffset_ {}
 

Detailed Description

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.


The documentation for this class was generated from the following files: