SysSockGetPeerName (FUN)ΒΆ

FUNCTION SysSockGetPeerName : RTS_IEC_RESULT

Returns the socket address of the peer to which a socket is connected.
The SysSockGetPeerName function can be used only on a connected socket.
InOut:

Scope

Name

Type

Comment

Return

SysSockGetPeerName

RTS_IEC_RESULT

Runtime system error code (see CmpErrors.library).

Input

hSocket

RTS_IEC_HANDLE

Handle to the socket

pSockAddr

POINTER TO SOCKADDRESS

Socket address of the peer

pdiSockAddrSize

POINTER TO DINT

Pointer to size of socket address structure