This function is part of the P2P Interface.
Remarks
Receive the next packet for the local user, and information associated with this packet, if it exists.
Return Value
-
EOS_EResult::EOS_Success - If the packet was received successfully
-
EOS_EResult::EOS_InvalidParameters - If input was invalid
-
EOS_EResult::EOS_NotFound - If there are no packets available for the requesting user
See Also
EOS_P2P_GetNextReceivedPacketSize
Parameters
EOS_P2P_ReceivePacket
Parameter Type And Name | Usage Information |
---|---|
EOS_HP2P Handle | |
const EOS_P2P_ReceivePacketOptions* Options | Information about who is requesting the size of their next packet, and how much data can be stored safely |
EOS_ProductUserId* OutPeerId | The Remote User who sent data. Only set if there was a packet to receive. |
EOS_P2P_SocketId* OutSocketId | The Socket ID of the data that was sent. Only set if there was a packet to receive. |
uint8_t* OutChannel | The channel the data was sent on. Only set if there was a packet to receive. |
void* OutData | Buffer to store the data being received. Must be at least EOS_P2P_GetNextReceivedPacketSize in length or data will be truncated |
uint32_t* OutBytesWritten | The amount of bytes written to OutData. Only set if there was a packet to receive. |