Class WindowsQos
Class for setting the Quality of Service (QOS) for UDP or TCP sockets used for transporting media or call signaling. This class is for the Windows operating systems only. It will not work when running on the Linux operating system. This class handles setting the Differentiated Services Code Point (DSCP) for both IPv4 and IPv6.
Inherited Members
Namespace: SipLib.Channels
Assembly: SipLib.dll
Syntax
public class WindowsQos
Constructors
| Edit this page View SourceWindowsQos()
Constructs a new Qos object. This constructor creates a Win32 handle to the Windows QOS subsystem and maintains it until the Shutdown method is called. Therefore, the Shutdown method must be called before this object is disposed of.
Declaration
public WindowsQos()
Methods
| Edit this page View SourceAddTcpQos(TcpClient, uint, IPEndPoint)
Adds the specified TcpClient object to the QOS subsystem and sets the Differentiated Services Code Point (DSCP) value for the IP layer that will handle transport for the socket. Use this method for TCP sockets.
Declaration
public int AddTcpQos(TcpClient TcpCli, uint DscpValue, IPEndPoint RemIpe)
Parameters
Type | Name | Description |
---|---|---|
TcpClient | TcpCli | TcpClient object to add QOS to. The socket must be in the connected state. |
uint | DscpValue | DSCP value to set. Must be between 0x00 and 0x3f inclusive. |
IPEndPoint | RemIpe | Remote IP endpoint of the socket. |
Returns
Type | Description |
---|---|
int | Returns a Flow Identifier (FlowID) that the Windows QOS subsystem assigned to the socket. The caller must retain this value and use it in the call to the RemoveQos() method. This method returns a value of 0 if it was not able to setup the QOS for the socket. In this case, the socket is still usable but the DSCP field for the IP layer will not be set. |
AddUdpQos(UdpClient, uint)
Adds the specified Socket object to the QOS subsystem and sets the Differentiated Servies Code Point (DSCP) value for the IP layer that will handle transport for the socket For UDP.
Declaration
public int AddUdpQos(UdpClient udpClient, uint DscpValue)
Parameters
Type | Name | Description |
---|---|---|
UdpClient | udpClient | UdpClient to set the DSCP value for. |
uint | DscpValue | DSCP value to set. Must be between 0x00 and 0x3f inclusive. |
Returns
Type | Description |
---|---|
int | Returns a Flow Identifier (FlowID) that the Windows QOS subsystem assigned to the socket. The caller must retain this value and use it in the call to the RemoveQos() method. This method returns a value of 0 if it was not able to setup the QOS for the socket. In this case, the socket is still usable but the DSCP field for the IP layer will not be set. |
RemoveQos(nint, int)
Removes the socket from the Windows QOS subsystem. This method must be called before the socket is closed.
Declaration
public void RemoveQos(nint SockHandle, int FlowId)
Parameters
Type | Name | Description |
---|---|---|
nint | SockHandle | Underlying Socket client object of a UDP or a TCP client socket. |
int | FlowId | Flow ID of the QOS flow that was returned by the AddQos() method. |
Shutdown()
Frees the handle to the underlying handle to the Windows QOS subsystem. This method must be called before this object is disposed of. Do not call any other methods of this object after this method is called.
Declaration
public void Shutdown()