Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/FGenericPlatformHostCommunicatio-
Description
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.
Virtual Inheritance
- IPlatformHostCommunication::OpenConnection → FGenericPlatformHostCommunication::OpenConnection
| Name | OpenConnection |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/GenericPlatform/GenericPlatformHostCommunication.h |
| Include Path | #include "GenericPlatform/GenericPlatformHostCommunication.h" |
virtual IPlatformHostSocketPtr OpenConnection
(
uint32 ProtocolIndex,
const FString & DebugName,
uint32 Version,
uint32 MinVersion
)
Socket object on success, nullptr otherwise.
Parameters
| Name | Remarks |
|---|---|
| ProtocolIndex | Arbitrary 0-based number indicating the communication channel (the same number needs to be used on the host PC). |
| DebugName | Name 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. |
See Also
-
CloseConnection
-
IPlatformHostSocket::GetState