Navigation
API > API/Runtime > API/Runtime/Sockets
References
| Module | Sockets |
| Header | /Engine/Source/Runtime/Sockets/Public/NetworkMessage.h |
| Include | #include "NetworkMessage.h" |
Syntax
struct FNFSMessageHeader
Remarks
Simple wrapper for sending and receiving atomic packets
Variables
| Type | Name | Description | |
|---|---|---|---|
| uint32 | Magic | Magic number, used for error checking and endianess checking | |
| uint32 | PayloadCrc | CRC of payload | |
| uint32 | PayloadSize | Size of payload |
Constructors
| Type | Name | Description | |
|---|---|---|---|
FNFSMessageHeader
(
const FSimpleAbstractSocket& InSocket |
Constructor for empty header | ||
FNFSMessageHeader
(
const FSimpleAbstractSocket& InSocket, |
Constructor for a header of a given payload |
Functions
| Type | Name | Description | |
|---|---|---|---|
| bool | ReceivePayload
(
FArrayReader& OutPayload, |
This function will receive a header, and then the payload array from the network | |
| bool | SendPayloadAndReceiveResponse
(
const TArray< uint8 >& Payload, |
This function will send a payload data (with header) and wait for a response, serializing the response to a FBufferArchive | |
| bool | WrapAndSendPayload
(
const TArray< uint8 >& Payload, |
This function will create a header for the payload, then send the header and payload over the network |