While it is not mandatory that a service provider support socket groups, providers are strongly encouraged to do so. As shown below, implementing the minimum required behavior for socket grouping is almost trivial. The advantage to providing even a minimal grouping implementation is that applications may then depend on grouping operations being at least tolerated in all cases, with significant advantages being realized in particular cases. The paragraphs below briefly mention the SPI functions that are used to establish and utilize socket groups.
The WSPSocket and WSPAccept functions are used to explicitly create and/or join a socket group coincident with creating a new socket. Once joined, a socket remains in a socket group until the socket is closed. A socket group terminates if all of its member sockets are closed. Socket group IDs can be retrieved by using WSPGetSockOpt with option SO_GROUP_ID. Relative priority can be accessed by using WSPGetSockOpt or WSPSetSockOpt with option SO_GROUP_PRIORITY.
Group QOS can be stipulated in WSPConnect, or WSPIoctl with SIO_SET_GROUP_QOS, if the socket specified in these function is the creator of its associated socket group. WSPIoctl with SIO_GET_GROUP_QOS can be used to retrieve the associated group QOS of the specified socket. See below for more information about the QOS specification.