Navigation
API > API/Runtime > API/Runtime/Sockets
Simple wrapper for sending and receiving atomic packets
| Name | FNFSMessageHeader |
| Type | struct |
| Header File | /Engine/Source/Runtime/Sockets/Public/NetworkMessage.h |
| Include Path | #include "NetworkMessage.h" |
Syntax
struct FNFSMessageHeader
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FNFSMessageHeader
(
const FSimpleAbstractSocket& InSocket |
Constructor for empty header | NetworkMessage.h | |
FNFSMessageHeader
(
const FSimpleAbstractSocket& InSocket, |
Constructor for a header of a given payload | NetworkMessage.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Magic | uint32 | Magic number, used for error checking and endianess checking | NetworkMessage.h | |
| PayloadCrc | uint32 | CRC of payload | NetworkMessage.h | |
| PayloadSize | uint32 | Size of payload | NetworkMessage.h |
Functions
Public
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static bool ReceivePayload
(
FArrayReader& OutPayload, |
This function will receive a header, and then the payload array from the network | NetworkMessage.h | |
static 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 | NetworkMessage.h | |
static bool WrapAndSendPayload
(
const TArray< uint8 >& Payload, |
This function will create a header for the payload, then send the header and payload over the network | NetworkMessage.h |