Matrix of Winsock Supported Functions
The following tables list the functions of the Winsock API that are supported by the RT-TCP/IP stack. All functions can work with either IPv4 or Ipv6 addresses unless otherwise mentioned. The address family values that are currently supported are AF_INT or AF_INT6, which are the internet address family formats for IPv4 and Ipv6.
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 in the area of asynchronous notification of network events. The enhanced functionality provided by the Winsock extensions is not guaranteed to be deterministic. It is recommended that applications be developed using the BSD API rather than the Winsock Extensions. Winsock extensions are easy to identify by their "WSA" prefix.
NOTE: Some options for some functions are not supported. Unsupported options are listed in the Remarks section for those functions.
NOTE: For an overview of the RT-TCP/IP stack's Winsock implementation logic, see Winsock Background.
NOTE: APIs that are not explicitly documented as supported are not guaranteed to work. You should thoroughly test any code that uses undocumented functions.
Winsock BSD (deterministic)
WinSock BSD API |
Description |
Returns a new socket that corresponds to an established connection from the listening socket queue. |
|
Assigns a local name to an unnamed socket. |
|
Removes a socket from the per-process object reference table. Only blocks if SO_LINGER is set with a nonzero time-out on a blocking socket. |
|
Initiates a connection on the specified socket. |
|
Frees address info returned by a call to freeaddrinfo. |
|
Provides protocol independent translation from hostname to address. |
|
Retrieves host information corresponding to a host name from a host database on a DNS server. |
|
Returns an ASCII string that can be used with gethostbyname. |
|
Provides name resolution from an address to the host name. |
|
Retrieves the name of the peer connected to the specified socket. |
|
Retrieves the local address to which the specified socket is bound. |
|
Retrieves options associated with the specified socket. RTX64 extends getsockopt with two additional options that apply at the IPPROTO_TCP level:
|
|
Converts a 32-bit quantity from host-byte order to network-byte order. |
|
Converts a 16-bit quantity from host-byte order to network-byte order. |
|
Converts a character string representing a number in the Internet standard ".'' notation to an Internet address value. |
|
Converts an Internet address value to an ASCII string in ".'' notation i.e., "a.b.c.d''. |
|
Converts an IPv4 or IPv6 Internet network address into a string in Internet standard format. |
|
Converts an IPv4 or IPv6 Internet network address in its standard text presentation form into its numeric binary form. |
|
Provides control for sockets. |
|
Listens for incoming connections on a specified socket. |
|
Converts a 32-bit quantity from network-byte order to host-byte order. |
|
Converts a 16-bit quantity from network byte order to host byte order. |
|
Receives data from a connected socket. |
|
Receives data from either a connected or unconnected socket. |
|
Performs synchronous I/O multiplexing. |
|
Sends data to a connected socket. |
|
Sends data to either a connected or unconnected socket. |
|
Stores options associated with the specified socket. RTX64 extends setsockopt with two additional options that apply at the IPPROTO_TCP level:
|
|
Shuts down part of a full-duplex connection. |
|
Creates an endpoint for communication and return a socket descriptor. |
Winsock Extensions (non-deterministic)
WinSock Extensions |
Description |
Returns a new socket that corresponds to an established connection from the listening socket queue. |
|
Terminates use of the Winsock 2 by RTSS process. |
|
Establishes a connection to a specified socket. |
|
Checks whether a socket is included in set of socket descriptors |
|
Returns the error status for the last Windows Sockets operation that failed. |
|
Converts a u_long IPv4 address in host byte order to TCP/IP network byte order. |
|
Converts a u_short IPv4 address in host byte-ordering to TCP/IP network byte order. |
|
Performs a protocol-specific I/O control action on the socket in any state. |
|
Converts a u_long in TCP/IP network byte order to host byte order. |
|
Converts a u_short in TCP/IP network byte order to host byte order. |
|
Receives data on a socket and returns the number of bytes received. |
|
Causes a socket to be closed for receiving. |
|
Receives a datagram on a socket and returns the number of bytes received. |
|
Transmits a message on a connected socket. |
|
Causes a socket to be closed for sending. |
|
Transmits a message on a connected or unconnected socket. |
|
Sets the error code which can be retrieved by WSAGetLastError call for the current thread. |
|
Creates a socket and returns an integer descriptor. The operation of WSASocket is controlled by socket-level options that are defined. setsockopt and getsockopt functions are used to set and get options. |
|
Initiate use of the Winsock by a RTSS process. |