PICO Unreal Platform SDK
UOnlinePicoNetworkingFunction Class Reference

OnlinePicoNetworking Blueprint Function class. More...

#include <Pico_Networking.h>

Static Public Member Functions

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

Detailed Description

OnlinePicoNetworking Blueprint Function class.

Member Function Documentation

◆ ReadPacket()

static bool ReadPacket ( UObject *  WorldContextObject,
TArray< uint8 > &  OutBinaries,
FString &  SendUserID 
)
static

Reads the messages from other users in the room.

Parameters
WorldContextObjectUsed to get the information about the current world.
OutBinariesReturns an array of byte.


Parameters
OutSendIdReturns user id which player send.


Returns
  • true: success
  • false: failure

◆ SendPacket()

static bool SendPacket ( UObject *  WorldContextObject,
const FString &  UserId,
TArray< uint8 >  BinaryArray,
bool  bReliable 
)
static

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

Parameters
WorldContextObjectUsed to get the information about the current world.
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()

static bool SendPacketToCurrentRoom ( UObject *  WorldContextObject,
TArray< uint8 >  BinaryArray,
bool  bReliable 
)
static

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

Parameters
WorldContextObjectUsed to get the information about the current world.
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