IWMSServerCurrentCounters.ConnectionRate (Visual Basic .NET)

The ConnectionRate property retrieves the number of players connecting per second.

Integer = IWMSServerCurrentCounters.ConnectionRate

Property Value

Integer containing the connection rate.

Remarks

This property is read-only. The server uses a 1-second interval to calculate the rate. To calculate a more current value, use the IWMSServerTotalCounters.ConnectedPlayers property.

Example

Imports Microsoft.WindowsMediaServices.Interop
Imports System.Runtime.InteropServices

Private Sub GetConnectionRate()

    ' Declare variables.
    Dim Server As WMSServer
    Dim CurrentCounters As IWMSServerCurrentCounters
    Dim iValue As Integer

Try
    ' Create the WMSServer object.
    Server = New WMSServer()

    ' Retrieve a list of current statistics
    ' for the server.
    CurrentCounters = Server.CurrentCounters

    ' Retrieve the number of clients connecting per second.
    iValue = CurrentCounters.ConnectionRate

Catch excCom As COMException
    ' TODO: Handle COM exceptions.
Catch exc As Exception
    ' TODO: Handle errors.
Finally
    ' TODO: Clean-up code goes here.
End Try

End Sub

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

Reference

IWMSServerCurrentCounters Object (Visual Basic .NET)

IWMSServerTotalCounters.ConnectedPlayers (Visual Basic .NET)