SysSockAccept (FUN)
FUNCTION SysSockAccept : 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).
- InOut:
Scope
Name
Type
Comment
Return
SysSockAcceptRTS_IEC_HANDLEHandle to the new accepted socket or RTS_INVALID_HANDLE if failed.
Input
hSocketRTS_IEC_HANDLEHandle to the socket
pSockAddrPOINTER TO SOCKADDRESS
Socket address of the client, who is connected
pdiSockAddrSizePOINTER TO DINT
Pointer to size of socket address structure
pResultPOINTER TO RTS_IEC_RESULT
Pointer to runtime system error code (see CmpErrors.library)