EOS_P2P_ReceivePacket

EOS API reference page for EOS_P2P_ReceivePacket

Choose your implementation method:

C

C#

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

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.

Related API Members

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. {Result}::{Result.InvalidParameters} - If input was invalid {Result}::{Result.NotFound} - If there are no packets available for the requesting user

Return Value

{Result}::{Result.Success} - If the packet was received successfully

Parameters

P2P.P2PInterface.ReceivePacket

Parameter Type And Name

Usage Information

ReceivePacketOptions options

Information about who is requesting the size of their next packet, and how much data can be stored safely

ProductUserId outPeerId

The Remote User who sent data. Only set if there was a packet to receive.

SocketId outSocketId

The Socket ID of the data that was sent. Only set if there was a packet to receive.

byte outChannel

The channel the data was sent on. Only set if there was a packet to receive.

byte[] outData

Buffer to store the data being received. Must be at least EOS_P2P_GetNextReceivedPacketSize in length or data will be truncated

Related API Members

Tags