Overview
The Networking abstraction attempts to unify basic networking features between the different platforms. This includes sending and receiving files between users, marking users that are in multiplayer mode, as well as checking if a user is logged in and has access to multiplayer services on the platform.
Since functionality varies between different platforms, some platform specific functions are required to facilitate the abstraction.
Networking Service Functions
CanAccessMultiplayer
Sends an asynchronous request to check whether the platform can access multiplayer services at this time.
Platforms | PlayStation, Xbox |
---|
API | Cry::GamePlatform::IService::CanAccessMultiplayer |
---|
Flow Graph Nodes | GamePlatform:Network:CanAccessMultiplayer |
---|
Schematyc Nodes | Function::GamePlatform::Service::Networking::CheckMultiplayerAccess |
---|
CloseSession
Closes a network session opened with SendPacket between the local user and the specified account.
Platforms | Steam |
---|
API | Cry::GamePlatform::INetworking::CloseSession |
---|
Flow Graph Nodes | GamePlatform:Network:CloseSession |
---|
Schematyc Nodes | Function::GamePlatform::Service::Networking::CloseSession |
---|
FilterText
Censors/filters the specified text on the platform. The output is limited to once per frame.
Info |
---|
This is useful for chat censoring; some platforms require you to censor chats depending on the region or rating of a game. |
Note |
---|
The output may not trigger on the same frame. |
Platforms | Steam, PlayStation, Xbox |
---|
API | Cry::GamePlatform::IService::FilterText |
---|
Flow Graph Nodes | GamePlatform:Network:FilterText |
---|
Schematyc Nodes | Function::GamePlatform::Service::Networking::FilterText |
---|
GetAuthToken
Retrieves the authorization token used for web services on the specified platform.
Platforms | Steam, PlayStation, Xbox |
---|
API | Cry::GamePlatform::IService::GetAuthToken |
---|
Flow Graph Nodes | GamePlatform:Network:AuthToken |
---|
Schematyc Nodes | Function::GamePlatform::Service::Networking::GetAuthToken |
---|
GetConnectionStatus
Retrieves the connection status of the service for the specified platform.
Platforms | PlayStation, Xbox |
---|
API | Cry::GamePlatform::IService::GetConnectionStatus |
---|
Flow Graph Nodes | GamePlatform:Network:ConnectionStatus |
---|
Schematyc Nodes | Function::GamePlatform::Service::Networking::GetConnectionStatus |
---|
IsLoggedIn
Checks if the platform is logged in and access to the backend is available.
Platforms | Steam, PlayStation, Xbox |
---|
API | Cry::GamePlatform::IService::IsLoggedIn |
---|
Flow Graph Nodes | GamePlatform:Network:IsLoggedIn |
---|
Schematyc Nodes | Function::GamePlatform::Service::Networking::IsLoggedIn |
---|
IsPacketAvailable
Anchor |
---|
| ispacketavailable |
---|
| ispacketavailable |
---|
|
Checks if there is a data packet available via the platform network and if so, returns the size of the data.
Note |
---|
This data is also binary. This means that if you read the data as a string, you may miss part of the data (binary can contain a binary zero, which for strings just means the end of the string). |
Platforms | Steam |
---|
API | Cry::GamePlatform::INetworking::IsPacketAvailable |
---|
Flow Graph Nodes | GamePlatform:Network:IsPacketAvailable |
---|
Schematyc Nodes | Function::GamePlatform::Service::Networking::IsPacketAvailable |
---|
ReadPacket
Tries to read the next packet payload. The output of this function would be the Source Account Identifier, the data that was read (can be a string or binary buffer, depending on if C++ API/Flow Graph or Schematyc is used), and the number of bytes that was read from the packet.
Info |
---|
The whole packet might have to be read multiple times until the total number of bytes read is equal to the size of the packet (obtained via IsPacketAvailable). |
Platforms | Steam |
---|
API | Cry::GamePlatform::INetworking::ReadPacket |
---|
Flow Graph Nodes | GamePlatform:Network:ReadPacket |
---|
Schematyc Nodes | Function::GamePlatform::Service::Networking::ReadPacket |
---|
SendPacket
Sends the data packet to the specified account via the platform network.
Info |
---|
This is the counter function to ReadPacket; only packets that are sent can be read. One user will send data via SendPacket to another, who can then check for IsPacketAvailable and then read data using ReadPacket. |
Platforms | Steam |
---|
API | Cry::GamePlatform::INetworking::SendPacket |
---|
Flow Graph Nodes | GamePlatform:Network:SendPacket |
---|
Schematyc Nodes | Function::GamePlatform::Service::Networking::SendPacket |
---|
SetIsInMultiplayer
Used to tell the platform service that multiplayer platform features are being used.
Platforms | PlayStation |
---|
API | Cry::GamePlatform::IService::SetIsInMultiplayer |
---|
Flow Graph Nodes | GamePlatform:Network:SetIsInMultiplayer |
---|
Schematyc Nodes | Function::GamePlatform::Service::Networking::SetIsInMultiplayer |
---|
Networking Service Events
OnAuthTokenReceived
Fired when an authorization token request receives a response.
Platforms | PlayStation, XboxAPI | Cry::GamePlatform::IService::IListener::OnAuthTokenReceived |
---|
Flow Graph Nodes | GamePlatform:Listener:Networking:OnAuthTokenReceived |
---|
Schematyc Nodes | Signal::Receive::[EntityName]::Accounts::PlatformSignalReceiver::Networking::OnAuthTokenReceived |
---|
OnCheckMultiplayerAccess
Fired when aa multiplayer access check request receives a response.
Platforms | Steam, PlayStation, Xbox |
---|
API | N/A (callback provided to Cry::GamePlatform::IService::CanAccessMultiplayer) |
---|
Flow Graph Nodes | N/A (uses provided callback to activate output directly) |
---|
Schematyc Nodes | Signal::Receive::[EntityName]::Accounts::PlatformSignalReceiver::Networking::OnCheckMultiplayerAccess |
---|
OnGetSteamAuthTicketResponse
Fired when a Steam Authentication token request receives a response.
Platforms | Steam |
---|
API | Cry::GamePlatform::IService::IListener::OnGetSteamAuthTicketResponse |
---|
Flow Graph Nodes | GamePlatform:Listener:Networking:OnGetSteamAuthTicketResponse |
---|
Schematyc Nodes | Signal::Receive::[EntityName]::Accounts::PlatformSignalReceiver::Networking::OnGetSteamAuthTicketResponse |
---|
OnLogInStateChanged
Fired when the local user's login state changes.
Platforms | PlayStation |
---|
API | Cry::GamePlatform::IService::IListener::OnLogInStateChanged |
---|
Flow Graph Nodes | GamePlatform:Listener:Networking:OnLogInStateChanged |
---|
Schematyc Nodes | Signal::Receive::[EntityName]::Accounts::PlatformSignalReceiver::Networking::OnLogInStateChanged |
---|
OnNetworkStatusChanged
Fired when the local user network status changes.
Platforms | PlayStation, Xbox |
---|
API | Cry::GamePlatform::IService::IListener::OnNetworkStatusChanged |
---|
Flow Graph Nodes | GamePlatform:Listener:Networking:OnNetworkStatusChanged |
---|
Schematyc Nodes | Signal::Receive::[EntityName]::Accounts::PlatformSignalReceiver::Networking::OnNetworkStatusChanged |
---|