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

#include <GenericPlatformHostSocket.h>

Public Types

enum class  EResultNet : uint8 {
  Ok , ErrorUnknown , ErrorInvalidArgument , ErrorInvalidConnection ,
  ErrorInterrupted , ErrorHostNotConnected
}
 
enum class  EConnectionState : uint8 {
  Unknown , Created , Connected , Disconnected ,
  Closed
}
 

Public Member Functions

virtual EResultNet Send (const void *Buffer, uint64 BytesToSend)=0
 
virtual EResultNet Receive (void *Buffer, uint64 BytesToReceive)=0
 
virtual EConnectionState GetState () const =0
 
virtual ~IPlatformHostSocket ()
 

Detailed Description

Interface for sockets supporting direct communication between the game running on the target device and a connected PC.

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

It is meant to be used in development ONLY.

See also
IPlatformHostCommunication

Definition at line 20 of file GenericPlatformHostSocket.h.

Member Enumeration Documentation

◆ EConnectionState

State of the socket determining its ability to send/receive data.

See also
GetState
Enumerator
Unknown 
Created 
Connected 
Disconnected 
Closed 

Definition at line 42 of file GenericPlatformHostSocket.h.

◆ EResultNet

Status values returned by Send and Receive members.

See also
Send, Receive
Enumerator
Ok 
ErrorUnknown 
ErrorInvalidArgument 
ErrorInvalidConnection 
ErrorInterrupted 
ErrorHostNotConnected 

Definition at line 28 of file GenericPlatformHostSocket.h.

Constructor & Destructor Documentation

◆ ~IPlatformHostSocket()

virtual IPlatformHostSocket::~IPlatformHostSocket ( )
inlinevirtual

Destructor.

Definition at line 79 of file GenericPlatformHostSocket.h.

Member Function Documentation

◆ GetState()

virtual EConnectionState IPlatformHostSocket::GetState ( ) const
pure virtual

Get the state of the socket (determines if the host pc is connected and communication is possible).

◆ Receive()

virtual EResultNet IPlatformHostSocket::Receive ( void * Buffer,
uint64 BytesToReceive )
pure virtual

Receive data from the connected host PC (blocking operation).

Parameters
BufferData to be sent.
BytesToReceiveThe number of bytes to receive (Buffer has to be large enough).
Returns
Status value indicating error or success.

◆ Send()

virtual EResultNet IPlatformHostSocket::Send ( const void * Buffer,
uint64 BytesToSend )
pure virtual

Send data to the connected host PC (blocking operation).

Parameters
BufferData to be sent.
BytesToSendThe number of bytes to send.
Returns
Status value indicating error or success.

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