![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <NetworkMessage.h>
Public Member Functions | |
| FNFSMessageHeader (const FSimpleAbstractSocket &InSocket) | |
| FNFSMessageHeader (const FSimpleAbstractSocket &InSocket, const TArray< uint8 > &Payload) | |
Static Public Member Functions | |
| static SOCKETS_API bool | WrapAndSendPayload (const TArray< uint8 > &Payload, const FSimpleAbstractSocket &Socket) |
| static SOCKETS_API bool | ReceivePayload (FArrayReader &OutPayload, const FSimpleAbstractSocket &Socket) |
| static SOCKETS_API bool | SendPayloadAndReceiveResponse (const TArray< uint8 > &Payload, class FArrayReader &Response, const FSimpleAbstractSocket &Socket) |
Public Attributes | |
| uint32 | Magic |
| uint32 | PayloadSize |
| uint32 | PayloadCrc |
Friends | |
| FArchive & | operator<< (FArchive &Ar, FNFSMessageHeader &Header) |
Simple wrapper for sending and receiving atomic packets
|
inline |
Constructor for empty header
|
inline |
Constructor for a header of a given payload
|
static |
This function will receive a header, and then the payload array from the network
| OutPayload | The archive to read into (the response is APPENDed to any data in the archive already, and the archive will be seeked to the start of new data) |
| Socket | The socket to read from |
|
static |
This function will send a payload data (with header) and wait for a response, serializing the response to a FBufferArchive
| Payload | Bytes to send over the network |
| Response | The archive to read the response into |
| Socket | Connection to send the header and payload |
|
static |
This function will create a header for the payload, then send the header and payload over the network
| Payload | Bytes to send over the network |
| Socket | Connection to send the header and payload |
|
friend |
Serializer for header
| uint32 FNFSMessageHeader::Magic |
Magic number, used for error checking and endianess checking
| uint32 FNFSMessageHeader::PayloadCrc |
CRC of payload
| uint32 FNFSMessageHeader::PayloadSize |
Size of payload