SysSockBind (FUN)ΒΆ
FUNCTION SysSockBind : RTS_IEC_RESULT
Bind a socket to a socket address and port number.
This functions calls the function bind of the operating system, which will assign a local address
to a socket that has already been allocated to an address by SysSockCreate, but not yet fixed uniquely.
This is usually done previous to a call to functions like SysSockListen or SysSockAccept.
- InOut:
Scope
Name
Type
Comment
Return
SysSockBind
RTS_IEC_RESULT
Runtime system error code (see CmpErrors.library).
Input
hSocket
RTS_IEC_HANDLE
Handle to the socket
pSockAddr
POINTER TO SOCKADDRESS
Spcket address
diSockAddrSize
DINT
Size of the socket address structure