IWMSServerLimits.PerPlayerConnectionBandwidth (C#)
Previous | Next |
IWMSServerLimits.PerPlayerConnectionBandwidth (C#)
The PerPlayerConnectionBandwidth property specifies and retrieves the maximum bandwidth permitted for a single player connection.
Syntax
IWMSServerLimits .PerPlayerConnectionBandwidth = int; int = IWMSServerLimits.PerPlayerConnectionBandwidth
Property Value
int containing the maximum bandwidth, in Kbps.
If this property fails, it throws an exception.
Number | Description |
0x80070057 | int is an invalid argument. |
Remarks
This property only applies to new connections. If the parameter is –1, there is no limit on the bandwidth. By default, the value of the parameter is –1.
Example Code
using Microsoft.WindowsMediaServices.Interop; using System.Runtime.InteropServices; // Retrieve the IWMSServerLimits object for the server. ServerLimits = Server.Limits; // Retrieve the bandwidth allowed for each client connection. iValue = ServerLimits.PerPlayerConnectionBandwidth; // Set the bandwidth allowed for each client connection. ServerLimits.PerPlayerConnectionBandwidth = 128; } catch (COMException comExc) { // TODO: Handle COM exceptions. } catch (Exception e) { // TODO: Handle exceptions. }
Requirements
Reference: Add a reference to Microsoft.WindowsMediaServices.
Namespace: Microsoft.WindowsMediaServices.Interop.
Assembly: Microsoft.WindowsMediaServices.dll.
Library: WMSServerTypeLib.dll.
Platform: Windows Server 2003 family, Windows Server 2008 family.
See Also
Previous | Next |