Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
IPlatformHostCommunication Class Referenceabstract

#include <GenericPlatformHostCommunication.h>

+ Inheritance diagram for IPlatformHostCommunication:

Public Member Functions

virtual void Initialize ()=0
 
virtual void Shutdown ()=0
 
virtual bool Available () const =0
 
virtual IPlatformHostSocketPtr OpenConnection (uint32 ProtocolIndex, const FString &DebugName, uint32 Version=0, uint32 MinVersion=0)=0
 
virtual void CloseConnection (IPlatformHostSocketPtr Socket)=0
 
virtual bool LaunchOnHost (const char *BinaryPath, const char *CmdLine=nullptr)=0
 
virtual ~IPlatformHostCommunication ()
 

Detailed Description

Interface for communication between the game running on the target device and the connected host pc.

It represents a custom communication channel and may not be implemented on all platforms.

It is meant to be used in development ONLY.

Definition at line 31 of file GenericPlatformHostCommunication.h.

Constructor & Destructor Documentation

◆ ~IPlatformHostCommunication()

virtual IPlatformHostCommunication::~IPlatformHostCommunication ( )
inlinevirtual

Virtual destructor.

Definition at line 89 of file GenericPlatformHostCommunication.h.

Member Function Documentation

◆ Available()

virtual bool IPlatformHostCommunication::Available ( ) const
pure virtual

Check if the host communication system is available and can be used.

Returns
True is available, false otherwise.

Implemented in FGenericPlatformHostCommunication.

◆ CloseConnection()

virtual void IPlatformHostCommunication::CloseConnection ( IPlatformHostSocketPtr Socket)
pure virtual

Close a communication channel previously opened using OpenConnection.

Parameters
SocketSocket object.

Implemented in FGenericPlatformHostCommunication.

◆ Initialize()

virtual void IPlatformHostCommunication::Initialize ( )
pure virtual

Initialize the host communication system (done by IPlatformFeaturesModule).

Implemented in FGenericPlatformHostCommunication.

◆ LaunchOnHost()

virtual bool IPlatformHostCommunication::LaunchOnHost ( const char * BinaryPath,
const char * CmdLine = nullptr )
pure virtual

Launch an executable on the connected host PC.

Parameters
BinaryPathPath to the executable on the PC to launch.
CmdLine(optional) Command line parameters to pass to the executable.
Returns
True on success, otherwise false (e.g. no permissions or incorrect executable path).

Implemented in FGenericPlatformHostCommunication.

◆ OpenConnection()

virtual IPlatformHostSocketPtr IPlatformHostCommunication::OpenConnection ( uint32 ProtocolIndex,
const FString & DebugName,
uint32 Version = 0,
uint32 MinVersion = 0 )
pure virtual

Open a communication channel with the host PC.

The connected PC is determined in a platform-dependent way.

Note that opening a connection does not necessarily mean that the host PC is ready to communicate. Check the state of the socket before attempting to send/receive data. There can be only one connection using any given ProtocolIndex. Attempts to use a ProtocolIndex while there is already a connection using it will fail.

Parameters
ProtocolIndexArbitrary 0-based number indicating the communication channel (the same number needs to be used on the host PC).
DebugNameName of this communication channel used for diagnostic purposes.
Version(optional) Version of the communication protocol (ProtocolIndex) used to verify compatibility with the host PC.
MinVersion(optional) Minimum version of the communication protocol (ProtocolIndex) that is supported.
Returns
Socket object on success, nullptr otherwise.
See also
CloseConnection, IPlatformHostSocket::GetState

Implemented in FGenericPlatformHostCommunication.

◆ Shutdown()

virtual void IPlatformHostCommunication::Shutdown ( )
pure virtual

Shutdown the host communication system (done by IPlatformFeaturesModule).

Implemented in FGenericPlatformHostCommunication.


The documentation for this class was generated from the following file: