Simple wrapper for sending and receiving atomic packets 更多...
#include <NetworkMessage.h>
Public 成员函数 | |
| FNFSMessageHeader (const FSimpleAbstractSocket &InSocket) | |
| Constructor for empty header | |
| FNFSMessageHeader (const FSimpleAbstractSocket &InSocket, const TArray< uint8 > &Payload) | |
| Constructor for a header of a given payload | |
静态 Public 成员函数 | |
| static bool | ReceivePayload (FArrayReader &OutPayload, const FSimpleAbstractSocket &Socket) |
| This function will receive a header, and then the payload array from the network 更多... | |
| static bool | SendPayloadAndReceiveResponse (const TArray< uint8 > &Payload, class FArrayReader &Response, const FSimpleAbstractSocket &Socket) |
| This function will send a payload data (with header) and wait for a response, serializing the response to a FBufferArchive 更多... | |
| static bool | WrapAndSendPayload (const TArray< uint8 > &Payload, const FSimpleAbstractSocket &Socket) |
| This function will create a header for the payload, then send the header and payload over the network 更多... | |
Public 属性 | |
| uint32 | Magic |
| Magic number, used for error checking and endianess checking | |
| uint32 | PayloadCrc |
| CRC of payload | |
| uint32 | PayloadSize |
| Size of payload | |
友元 | |
| FArchive & | operator<< (FArchive &Ar, FNFSMessageHeader &Header) |
| Serializer for header | |
Simple wrapper for sending and receiving atomic packets
|
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 |