Using the Winsock API

A wRTOS design goal is to have as much source-level compatibility as possible between the TCP/IP Stack and the Winsock API (the API used to develop TCP/IP applications for Microsoft Windows). The TCP/IP Stack is based on the Treck Inc. Treck TCP/IP version 6.0.1.72 Release.

The Winsock API is divided into 2 primary APIs: BSD and Winsock Extensions. The BSD group is Microsoft's version of the Berkeley Standard API. The Winsock extensions are additional APIs developed by Microsoft to further enhance the functionality of the protocol stack, particularly around asynchronous notification of network events. Winsock extensions are easy to identify by their WSA prefix.

A list of Winsock functions supported by the TCP/IP Stack is included in the Winsock API Reference.

Note: In any real-time application, initialization and cleanup procedures are necessary but assumed to be non-deterministic and should never fall within critical real-time loops. The same is true for WSAStartup and WSACleanup which are non-deterministic but must be used for proper initialization and cleanup.

Topics: