SysSockGetOption (FUN) ¶ FUNCTION SysSockGetOption : RTS_IEC_RESULT Set options of a specified socket. InOut: Scope Name Type Comment Return SysSockGetOption RTS_IEC_RESULT Runtime system error code (see CmpErrors.library). Input hSocket RTS_IEC_HANDLE Handle to the socket diLevel DINT Level of the socket diOption DINT Socket option command pdiOptionValue POINTER TO DINT Pointer to the option value pdiOptionLen POINTER TO DINT Lenght of option value
SysSockGetRecvSizeUdp (FUN) ¶ FUNCTION SysSockGetRecvSizeUdp : __XINT Check actual received data on the UDP socket. InOut: Scope Name Type Comment Return SysSockGetRecvSizeUdp __XINT Number of bytes actual available in the socket Input hSocketUdp RTS_IEC_HANDLE Handle to the UDP socket diTimeout DINT Timeout to wait for received data. -1 = Infinite wait 0 = no wait pResult POINTER TO RTS_IEC_RESULT Pointer to runtime system error code (see CmpErrors.library)
SysSockGetSockName (FUN) ¶ FUNCTION SysSockGetSockName : RTS_IEC_RESULT Returns the socket address of the local socket. Usally this function is called to retrieve the local socket address on multihomed hosts or to get the local port number in client implemntations. If the socket is neither connected nor locally bound to an address, the result of the function and the value stored in the object pointed to by pSockAddress is unspecified. InOut: Scope Name Type Comment Return SysSockGetSockName 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 local socket pdiSockAddrSize POINTER TO DINT Pointer to size of socket address structure
SysSockGetSubnetMask (FUN) ¶ FUNCTION SysSockGetSubnetMask : RTS_IEC_RESULT Get subnetmask of a specified IP address adapter. InOut: Scope Name Type Comment Return SysSockGetSubnetMask RTS_IEC_RESULT Runtime system error code (see CmpErrors.library). Input szIPAddress REFERENCE TO STRING IP address of the communication partner as string szSubnetMask REFERENCE TO STRING Subnet mask as string diMaxSugnetMask DINT Maximum length of the subnet mask string
SysSockHtons (FUN) ¶ FUNCTION SysSockHtons : WORD Converts a value of type short from order of the TCP/IP network to the host byte order. InOut: Scope Name Type Comment Return SysSockHtons WORD Converted WORD value Input usHost WORD Ethernet value
SysSockInetAddr (FUN) ¶ FUNCTION SysSockInetAddr : RTS_IEC_RESULT Convert an IP address string into an IP address. InOut: Scope Name Type Comment Return SysSockInetAddr RTS_IEC_RESULT Runtime system error code (see CmpErrors.library). Input szIPAddress REFERENCE TO STRING Pointer to get IP address string (must be at least 16 bytes long) pInAddr POINTER TO UDINT Pointer to IP address description
SysSockInetNtoa (FUN) ¶ FUNCTION SysSockInetNtoa : RTS_IEC_RESULT Convert IP address to a string. InOut: Scope Name Type Comment Return SysSockInetNtoa RTS_IEC_RESULT Runtime system error code (see CmpErrors.library). Input pInAddr POINTER TO INADDR Pointer to IP address description szIPADDR REFERENCE TO STRING Pointer to get IP address string (must be at least 16 bytes long) diIPAddrSize DINT Maximum length of szIPAddr
SysSockIoctl (FUN) ¶ FUNCTION SysSockIoctl : RTS_IEC_RESULT Io-control of a socket. InOut: Scope Name Type Comment Return SysSockIoctl RTS_IEC_RESULT Runtime system error code (see CmpErrors.library). Input hSocket RTS_IEC_HANDLE Handle to the socket diCommand DINT Io-control command pdiParameter POINTER TO DINT Parameter value of the command
SysSockListen (FUN) ¶ FUNCTION SysSockListen : RTS_IEC_RESULT Listen on a TCP server socket for new connection. InOut: Scope Name Type Comment Return SysSockListen RTS_IEC_RESULT Runtime system error code (see CmpErrors.library). Input hSocket RTS_IEC_HANDLE Handle to the socket diMaxConnections DINT Maximum number of connections allowed
SysSockNtohl (FUN) ¶ FUNCTION SysSockNtohl : UDINT Convert a UDINT value from ethernet byte order into host format. InOut: Scope Name Type Comment Return SysSockNtohl UDINT Converted UDINT value Input ulNet UDINT Ethernet value