WSACleanup
WSACleanup terminates use of the eRTOS TCP/IP stack within a process.
Syntax
int WSACleanup(void);
Parameters
None
Return Value
If the function succeeds, it returns 0 (zero). If the function fails, it returns SOCKET_ERROR.
Use WSAGetLastError to retrieve a specific error code.
Remarks
An application must perform several WSACleanup calls equal to the number of WSAStartup calls, which would decrement a startup count. The last call would perform an actual cleanup.
If the process exits without calling WSACleanup (number of times equal to WSAStartup), or is killed by Kill, eRTOS will attempt to perform an equivalent to WSACleanup before performing the remainder of RtProcessTerminate.
This scenario might also occur when an application is run under the debugger, Stop Debugging is issued, and the application is stopped on a breakpoint.
Requirements
Minimum supported version | Header | Library |
---|---|---|
eRTOS 1.0 SDK |
Winsock2.h | RtTcpipApi.lib |