Navigation
API > API/Developer > API/Developer/TargetPlatform > API/Developer/TargetPlatform/ITargetDevice
Description
Opens a direct connection with the device allowing data exchange with a process running on the target.
ProtocolIndex is a number that identifies the connection and has to be know both to the target process and the PC. There can be only one connection using a given protocol index at a time.
You may check EHostProtocol enumeration for known protocols used by the engine.
This function just opens a communication channel but doesn't check if there is a peer on the other end of the connection. To know this, you should either check IsProtocolAvailable or ITargetDeviceSocket::Connected.
| Name | OpenConnection |
| Type | function |
| Header File | /Engine/Source/Developer/TargetPlatform/Public/Interfaces/ITargetDevice.h |
| Include Path | #include "Interfaces/ITargetDevice.h" |
virtual ITargetDeviceSocketPtr OpenConnection
(
uint32 ProtocolIndex
)
Socket object on success, nullptr otherwise.
Parameters
| Name | Remarks |
|---|---|
| ProtocolIndex | Unique index of the communication channel (from 0 to a platform-dependent maximum). |
See Also
-
CloseSocket
-
ITargetDeviceSocket::Connected