![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <GenericPlatformHostSocket.h>
Public Types | |
| enum class | EResultNet : uint8 { Ok , ErrorUnknown , ErrorInvalidArgument , ErrorInvalidConnection , ErrorInterrupted , ErrorHostNotConnected } |
| enum class | EConnectionState : uint8 { Unknown , Created , Connected , Disconnected , Closed } |
| enum class | EReceiveFlags : uint8 { DontWait , WaitAll } |
Public Member Functions | |
| virtual EResultNet | Send (const void *Buffer, uint64 BytesToSend)=0 |
| virtual EResultNet | Receive (void *Buffer, uint64 BytesToReceive)=0 |
| virtual EResultNet | Receive (void *Buffer, uint64 BytesToReceive, uint64 &BytesReceived, EReceiveFlags ReadMode=EReceiveFlags::WaitAll)=0 |
| virtual EConnectionState | GetState () const =0 |
| virtual | ~IPlatformHostSocket () |
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.
|
strong |
State of the socket determining its ability to send/receive data.
| Enumerator | |
|---|---|
| Unknown | |
| Created | |
| Connected | |
| Disconnected | |
| Closed | |
|
strong |
|
strong |
|
inlinevirtual |
Destructor.
|
pure virtual |
Get the state of the socket (determines if the host pc is connected and communication is possible).
|
pure virtual |
Receive data from the connected host PC (blocking operation).
| Buffer | Data to be sent. |
| BytesToReceive | The number of bytes to receive (Buffer has to be large enough). |
|
pure virtual |
Receive data from the connected host PC.
| Buffer | Data to be sent. |
| BytesToReceive | The number of bytes to receive (Buffer has to be large enough). |
| BytesReceived | Number of bytes that have been received (equals to BytesToReceive if ReadMode is EReceiveFlags::WaitAll) |
| ReadMode | DontWait if this call should return immediately with the data available and not wait for BytesToReceive number of bytes |
|
pure virtual |
Send data to the connected host PC (blocking operation).
| Buffer | Data to be sent. |
| BytesToSend | The number of bytes to send. |