SysSockFdZero (FUN) ¶ FUNCTION SysSockFdZero : RTS_IEC_RESULT Clear a Socket set. InOut: Scope Name Type Comment Return SysSockFdZero RTS_IEC_RESULT Returns the runtime system error code (see CmpErrors.library). Input pfs REFERENCE TO SOCKET_FD_SET Socket Set
SysSockGetFirstAdapterInfo (FUN) ¶ FUNCTION SysSockGetFirstAdapterInfo : RTS_IEC_HANDLE Get adapter information struct of the first network adapter. Note: It may took a while until a change of the adapter configuration is reflected here. InOut: Scope Name Type Comment Return SysSockGetFirstAdapterInfo RTS_IEC_HANDLE Handle to be passed to SysSockGetNextAdapter() to retrieve the next adapter information. Input pAdapterInfo POINTER TO SOCK_ADAPTER_INFORMATION Network adapter information structure puxiAdapterInfoSize POINTER TO __UXINT Size in bytes of |SOCK_ADAPTER_INFORMATION| ; returns structure size from external implementation pResult POINTER TO RTS_IEC_RESULT Pointer to runtime system error code (see CmpErrors.library)
SysSockGetHostByName (FUN) ¶ FUNCTION SysSockGetHostByName : RTS_IEC_RESULT Get host description specified by host name. InOut: Scope Name Type Comment Return SysSockGetHostByName RTS_IEC_RESULT Runtime system error code (see CmpErrors.library). Input szHostName REFERENCE TO STRING Reference to host name pHost POINTER TO SOCK_HOSTENT Pointer to host description
SysSockGetHostName (FUN) ¶ FUNCTION SysSockGetHostName : RTS_IEC_RESULT Get host name of the target. InOut: Scope Name Type Comment Return SysSockGetHostName RTS_IEC_RESULT Runtime system error code (see CmpErrors.library). Input szHostName REFERENCE TO STRING Reference to get host name diNameLen DINT Maximum length of hostname
SysSockGetNextAdapterInfo (FUN) ¶ FUNCTION SysSockGetNextAdapterInfo : RTS_IEC_HANDLE Get adapter information struct of the next network adapter from the adapter list. Note: It may took a while until a change of the adapter configuration is reflected here. InOut: Scope Name Type Comment Return SysSockGetNextAdapterInfo RTS_IEC_HANDLE Handle to be passed to SysSockGetNextAdapter() to retrieve the next adapter information. Input hPrevAdapter RTS_IEC_HANDLE Handle returned by SysSockGetFirstAdapter() or by previous call of SysSockGetNextAdapter() pAdapterInfo POINTER TO SOCK_ADAPTER_INFORMATION Network adapter information structure puxiAdapterInfoSize POINTER TO __UXINT Size in bytes of SOCK_ADAPTER_INFORMATION; returns structure size from external implementation pResult POINTER TO RTS_IEC_RESULT Pointer to runtime system error code (see CmpErrors.library)
SysSockGetOSHandle (FUN) ¶ FUNCTION SysSockGetOSHandle : RTS_IEC_HANDLE Get operating system handle of the UDP socket. InOut: Scope Name Type Comment Return SysSockGetOSHandle RTS_IEC_HANDLE Operating system handle Input hSocketUdp RTS_IEC_HANDLE Handle to the UDP socket
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
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
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