PICO Unreal Platform SDK
FPicoNetworkingInterface Class Reference

PicoNetworkingInterface class. More...

#include <Pico_Networking.h>

Public Member Functions

bool SendPacket (const FString &UserId, TArray< uint8 > BinaryArray)
 Sends messages to a specified user. The maximum messaging frequency is 1000/s. More...
 
bool SendPacket (const FString &UserId, TArray< uint8 > BinaryArray, bool bReliable)
 Sends messages to a specified user. The maximum messaging frequency is 1000/s. More...
 
bool SendPacketToCurrentRoom (TArray< uint8 > BinaryArray)
 Sends messages to other users in the room. The maximum messaging frequency is 1000/s. More...
 
bool SendPacketToCurrentRoom (TArray< uint8 > BinaryArray, bool bReliable)
 Sends messages to other users in the room. The maximum messaging frequency is 1000/s. More...
 
bool ReadPacket (TArray< uint8 > &OutBinaries, FString &OutSendId)
 Reads the messages from other users in the room. More...
 

Detailed Description

PicoNetworkingInterface class.

Member Function Documentation

◆ ReadPacket()

bool ReadPacket ( TArray< uint8 > &  OutBinaries,
FString &  OutSendId 
)

Reads the messages from other users in the room.

Parameters
OutBinariesReturns an array of byte.


Parameters
OutSendIdReturns user id which player send.


Returns
  • true: success
  • false: failure

◆ SendPacket() [1/2]

bool SendPacket ( const FString &  UserId,
TArray< uint8 >  BinaryArray 
)

Sends messages to a specified user. The maximum messaging frequency is 1000/s.

Parameters
UserIdThe ID of the user to send messages to.
BinaryArrayThe message length (in bytes). The maximum bytes allowed is 512.
Returns
  • true: success
  • false: failure

◆ SendPacket() [2/2]

bool SendPacket ( const FString &  UserId,
TArray< uint8 >  BinaryArray,
bool  bReliable 
)

Sends messages to a specified user. The maximum messaging frequency is 1000/s.

Parameters
UserIdThe ID of the user to send messages to.
BinaryArrayThe message length (in bytes). The maximum bytes allowed is 512.
bReliableWhen reliable is set to true, messages between lost and resume will not be lost. The retention time is determined by the reserve_period parameter configured for the matchmaking pool, with a maximum of 1 minute. When reliable is set to false, this function works the same as the other SendPacket function.
Returns
  • true: success
  • false: failure

◆ SendPacketToCurrentRoom() [1/2]

bool SendPacketToCurrentRoom ( TArray< uint8 >  BinaryArray)

Sends messages to other users in the room. The maximum messaging frequency is 1000/s.

Parameters
BinaryArrayThe message length (in bytes). The maximum bytes allowed is 512.
Returns
  • true: success
  • false: failure

◆ SendPacketToCurrentRoom() [2/2]

bool SendPacketToCurrentRoom ( TArray< uint8 >  BinaryArray,
bool  bReliable 
)

Sends messages to other users in the room. The maximum messaging frequency is 1000/s.

Parameters
BinaryArrayThe message length (in bytes). The maximum bytes allowed is 512.
bReliableWhen reliable is set to true, messages between lost and resume will not be lost. The retention time is determined by the reserve_period parameter configured for the matchmaking pool, with a maximum of 1 minute. When reliable is set to false, this function works the same as the other SendPacketToCurrentRoom function.
Returns
  • true: success
  • false: failure