SysSock2Select (FUN) ¶ FUNCTION SysSock2Select : RTS_IEC_RESULT Check a number of sockets for activity. All sockets added to the FD_SETs have to be of the same type (Standard or TLS) InOut: Scope Name Type Comment Return SysSock2Select RTS_IEC_RESULT Runtime system error code (see CmpErrors.library): ERR_OK ERR_SOCK_TIMEDOUT, if timeout expired Input hSocket RTS_IEC_HANDLE Handle to one of the socket handles added to the FD Sets. diWidth DINT Number of sockets in the |SOCKET_FD_SET| structure, so |SOCKET_FD_SETSIZE| must be used here. pfdRead POINTER TO SOCKET_FD_SET Optional pointer to the structure |SOCKET_FD_SET| defining the socket set to be checked for reading. It is also possible to set this parameter to 0. pfdWrite POINTER TO SOCKET_FD_SET Optional pointer to the structure |SOCKET_FD_SET| defining the socket set to be checked for writing. It is also possible to set this parameter to 0. pfdExcept POINTER TO SOCKET_FD_SET Optional pointer to structure |SOCKET_FD_SET| that defines the socket set the error state has to be checked. It is also possible to set this parameter to 0. ptvTimeout POINTER TO SOCKET_TIMEVAL Pointer to maximum timespan which the function SysSockSelect waits for a response: ptvTimeout=NULL: Infinite wait ptvTimeout->tv_sec=-1, ptvTimeout->tv_usec=-1: Infinite wait ptvTimeout->tv_sec=0, ptvTimeout->tv_usec=0: No wait pdiReady POINTER TO DINT Number of sockets that are ready for IO
SysSock2SendTo (FUN) ¶ FUNCTION SysSock2SendTo : __XINT Send a message over a connectionless socket (UDP). InOut: Scope Name Type Comment Return SysSock2SendTo __XINT Number of bytes sent. Input hSocket RTS_IEC_HANDLE Handle to the socket pbyBuffer POINTER TO BYTE Buffer with send data diBufferSize __XINT Length of data to send. If diBufferSize = 0 ERR_PARAMETER is returned diFlags DINT The flags parameter can be used to influence the behavior of the function beyond the options specified for the associated socket. The semantics of this function are determined by the socket options and the flags parameter. The latter is constructed by using the bitwise OR operator with any of the SOCKET_MSG values. pSockAddr POINTER TO SOCKADDRESS Socket address and port to sent data to diSockAddrSize DINT Size of socket address structure pResult POINTER TO RTS_IEC_RESULT Pointer to runtime system error code (see CmpErrors.library)
SysSock2SetOption (FUN) ¶ FUNCTION SysSock2SetOption : RTS_IEC_RESULT Set options of a specified socket. InOut: Scope Name Type Comment Return SysSock2SetOption 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 BYTE Pointer to the option value diOptionLen DINT Lenght of option value
SysSock2Shutdown (FUN) ¶ FUNCTION SysSock2Shutdown : RTS_IEC_RESULT Shutdown a socket. InOut: Scope Name Type Comment Return SysSock2Shutdown RTS_IEC_RESULT Runtime system error code (see CmpErrors.library). Input hSocket RTS_IEC_HANDLE Handle to the socket diHow DINT Specifies, which operations are no longer be allowed. See shutdown flags.
File and Project Information ¶ Scope Name Type Content FileHeader creationDateTime date 02.03.2023, 11:07:28 companyName string 3S-Smart Software Solutions GmbH libraryFile SysSocket2 Implementation.library primaryProject True productName CODESYS productProfile CODESYS V3.5 SP16 Patch 3 contentFile SysSocket2 Implementation.clean.json version version 2.0.0.0 ProjectInformation IsEndUserLibrary bool False Released True LastModificationDateTime date 02.03.2023, 11:07:26 LibraryCategories library-category-list System|SysLibs Author string CODESYS Development GmbH Company System CompiledLibraryCompatibilityVersion CODESYS V3.5 SP15 Patch 2 DefaultNamespace Description See: Description DocFormat reStructuredText Placeholder SysSocket2 Implementation Project SysSocket2 Implementation Title SysSocket2 Implementation Version version 3.5.19.0
Library Reference ¶ This is a dictionary of all referenced libraries and their name spaces. SysSocket Interfaces ¶ Library Identification ¶ Name: SysSocket Interfaces Version: newest Company: System Namespace: SysSocket_Interfaces Library Properties ¶ LinkAllContent: False Optional: False QualifiedOnly: False SystemLibrary: False Key: SysSocket Interfaces, * (System) SysSocket2 Interfaces ¶ Library Identification ¶ Name: SysSocket2 Interfaces Version: newest Company: System Namespace: SysSocket2_Interfaces Library Properties ¶ LinkAllContent: False Optional: False QualifiedOnly: False SystemLibrary: False Key: SysSocket2 Interfaces, * (System) SysTypes2 Interfaces ¶ Library Identification ¶ Name: SysTypes2 Interfaces Version: newest Company: System Namespace: SysTypes Library Properties ¶ LinkAllContent: False Optional: False QualifiedOnly: False SystemLibrary: False Key: SysTypes2 Interfaces, * (System)
SysSocket2 Library Documentation ¶ Company System Title SysSocket2 Version 3.5.19.0 Categories System|SysLibs Author 3S - Smart Software Solutions GmbH Placeholder SysSocket2 Description 1 ¶ Library, to get access to the socket interface for TCP/IP communication on the target. Indices and tables ¶ 1 Based on SysSocket2.library, last modified 02.03.2023, 11:07:04. LibDoc 4.4.0.0-b.27 The content file SysSocket2.clean.json was generated with CODESYS V3.5 SP16 Patch 3 on 02.03.2023, 11:07:06.
SysSocket2 Implementation Library Documentation ¶ Company System Title SysSocket2 Implementation Version 3.5.19.0 Categories System|SysLibs Author CODESYS Development GmbH Placeholder SysSocket2 Implementation Description 1 ¶ Library, to get access to the socket interface for TCP/IP communication on the target. Contents: ¶ SysSock2Accept (Function) SysSock2Bind (Function) SysSock2Close (Function) SysSock2Connect (Function) SysSock2Create (Function) SysSock2FdInit (Function) SysSock2FdIsset (Function) SysSock2FdZero (Function) SysSock2GetOption (Function) SysSock2GetPeerName (Function) SysSock2GetSockName (Function) SysSock2Htonl (Function) SysSock2Htons (Function) SysSock2InetAddr (Function) SysSock2InetNtoa (Function) SysSock2Ioctl (Function) SysSock2Listen (Function) SysSock2Ntohl (Function) SysSock2Ntohs (Function) SysSock2Recv (Function) SysSock2RecvFrom (Function) SysSock2RecvMsg (Function) SysSock2Select (Function) SysSock2Send (Function) SysSock2SendTo (Function) SysSock2SetOption (Function) SysSock2Shutdown (Function) Indices and tables ¶ 1 Based on SysSocket2 Implementation.library, last modified 02.03.2023, 11:07:26. LibDoc 4.4.0.0-b.27 The content file SysSocket2 Implementation.clean.json was generated with CODESYS V3.5 SP16 Patch 3 on 02.03.2023, 11:07:28.
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 SysSock2Bind 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
SysSock2Accept (FUN) ¶ FUNCTION SysSock2Accept : RTS_IEC_HANDLE Accept the next incoming TCP connection. This functions calls the function accept of the operating system, which can accept a request to connect to a socket. A new descriptor (handle) for the socket is returned. The original socket is reset to the “listening” state (see SysSockListen). Note For TLS Sockets the blocking mode will be set to nonblocking for the new client sockets. If a blocking behavior is needed use SysSock2Ioctl to set the socket to blocking mode. This reflects the behavior of SysSock2Create for TLS sockets. InOut: Scope Name Type Comment Return SysSock2Accept RTS_IEC_HANDLE Handle to the new accepted socket or RTS_INVALID_HANDLE if failed. Input hSocket RTS_IEC_HANDLE Handle to the socket pSockAddr POINTER TO SOCKADDRESS Socket address of the client, who is connected pdiSockAddrSize POINTER TO DINT Pointer to size of socket address structure pResult POINTER TO RTS_IEC_RESULT Pointer to runtime system error code (see CmpErrors.library)