SysSock2Bind (FUN)
FUNCTION SysSock2Bind : 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 SysSock2Create, but not yet fixed uniquely.
This is usually done previous to a call to functions like SysSock2Listen or SysSock2Accept.
- InOut:
Scope
Name
Type
Comment
Return
SysSock2BindRTS_IEC_RESULTRuntime system error code (see CmpErrors.library).
Input
hSocketRTS_IEC_HANDLEHandle to the socket
pSockAddrPOINTER TO SOCKADDRESS
Spcket address
diSockAddrSizeDINTSize of the socket address structure