HSOCKET_TO_STRING

The function converts the connection handle of type T_HSOCKET to a string (e.g. for debug outputs).
The returned string has the following format: "Handle:0xA[BCD] Local:a[aa].b[bb].c[cc].d[dd]:port Remote:a[aa].b[bb].c[cc].d[dd]:port".
Example: "Handle:0x4001 Local:172.16.6.195:28459 Remote:172.16.6.180:2404"
Syntax
FUNCTION HSOCKET_TO_STRING : STRING
VAR_INPUT
hSocket : T_HSOCKET;
END_VAR
Return value
Name | Type | Description |
---|---|---|
HSOCKET_TO_STRING | STRING | Contains the STRING representation of the connection handle. |
Inputs
Name | Type | Description |
---|---|---|
hSocket | T_HSOCKET | The connection handle to be converted. |
Requirements
Development environment | Target system type | PLC libraries to include (category group) |
---|---|---|
TwinCAT v3.1.0 | PC, or CX (x86, X64, Arm®) | Tc2_TcpIp (communication) |