Matrix of Winsock Supported Functions
The following tables list the functions of the Winsock API that are supported by the 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: 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 timeout 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 a hostname to an IP address. |
|
|
Returns an ASCII string representation of the first IPv4 address configured on a system. |
|
|
Provides name resolution from an address to the hostname. |
|
|
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. wRTOS 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. wRTOS extends setsockopt with two additional options that apply at the IPPROTO_TCP level:
|
|
|
Shuts down part or all 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 order 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 an RTSS process. |