Platform SDK: Quality of Service

Opening a QOS-Enabled Socket

The services and service quality guarantees provided by the RSVP SP require a QOS-enabled socket. The process of finding a QOS-enabled protocol involves the following steps:

  1. Call the WSAEnumProtocols function to enumerate the existing protocols.
  2. Loop through the enumerated protocols to find a protocol that supports QOS. QOS support is indicated by the presence of the XP1_QOS_SUPPORTED flag in dwServiceFlags1 in the WSAPROTOCOL_INFO structure.
  3. Call the WSASocket function, and pass a pointer to the WSAPROTOCOL_INFO structure corresponding to the QOS-enabled protocol. Note that the RSVP SP requires an overlapped socket. Create the socket in overlapped mode by setting the WSA_FLAG_OVERLAPPED flag in the dwFlags parameter of the WSASocket function.

Note  Do not attempt to use the WSADuplicateSocket function to create QOS-enabled sockets; the WSADuplicateSocket function cannot be used on a QOS-enabled socket. Attempting to do so will result in the return of a WSAEINVAL error.