Usage Model

The usage model for QOS in Windows Sockets 2 is as follows. QOS parameters for a socket are established using WSPIoctl with SIO_SET_QOS/SIO_SET_GROUP_QOS. For connection-oriented protocols, however, it is often most convenient for an application to stipulate its QOS request at connect time. This is manifest to the service provider via the WSPConnect function. Note that any QOS pre-set via WSPIoctl for connection-oriented sockets will be overridden if the QOS parameters in WSPConnect are non-null.

Regardless of which method is used to establish the QOS parameters, they are typically utilized by the service provider at the time a connect operation is performed. If the WSPConnect function completes successfully the client knows that its QOS request has been honored by the network, and it is then free to use the socket for data exchange. If the connect operation fails because of limited resources an appropriate error indication is given. At this point the client may scale down its service request and try again or simply give up.

Connectionless sockets may also use WSPConnect to establish a specified QOS level to a single designated peer. Otherwise the WSPIoctl with SIO_SET_QOS/SIO_SET_GROUP_QOS could be used to stipulate the initial QOS request, and any subsequent QOS renegotiations.