HSOCKET_TO_STRING

HSOCKET_TO_STRING 1:

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

HSOCKET_TO_STRING 2: Return value

Name

Type

Description

HSOCKET_TO_STRING

STRING

Contains the STRING representation of the connection handle.

HSOCKET_TO_STRING 3: 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)