Share via


IWMSPublishingPointCurrentCounters Object (C#)

You can use the IWMSPublishingPointCurrentCounters object to retrieve real-time information about the number of connections to the publishing point and the amount of bandwidth allocated to the connections.

The IWMSPublishingPointCurrentCounters object exposes the following properties.

Property

Description

AllCounters

Retrieves an array that contains all of the counters supported by the object.

ConnectedPlayers

Retrieves the total number of players connected to the publishing point.

OutgoingDistributionAllocatedBandwidth

Retrieves the bandwidth allocated for distribution connections.

OutgoingDistributionConnections

Retrieves the total number of distribution connections.

PlayerAllocatedBandwidth

Retrieves the bandwidth allocated for player connections.

StreamingHTTPPlayers

Retrieves the total number of players receiving streamed content by using the HTTP protocol.

StreamingMMSPlayers

Retrieves the total number of players receiving streamed content by using the MMS protocol. (The MMS protocol is not supported in Windows Server 2008 operating systems.)

StreamingPlayers

Retrieves the total number of players receiving streamed content from the publishing point.

StreamingRTSPPlayers

Retrieves the total number of players receiving streamed content by using the RTSP protocol.

StreamingUDPPlayers

Retrieves the total number of players receiving streamed content by using the User Datagram Protocol (UDP).

Example

The following example illustrates how to retrieve an IWMSPublishingPointCurrentCounters object.

using Microsoft.WindowsMediaServices.Interop;
using System.Runtime.InteropServices;

// Declare variables.
WMSServer                            Server;
IWMSPublishingPoints                 PubPoints;
IWMSPublishingPoint                  PubPoint;
IWMSPublishingPointCurrentCounters   CurrentCounters;

try {
    // Create a new WMSServer object.
    Server = new WMSServerClass();

    // Retrieve the IWMSPublishingPoints object.
    PubPoints = Server.PublishingPoints;

    // Retrieve information about each publishing point.
    for (int i = 0; i < PubPoints.Count; i++)
    {
        PubPoint = PubPoints[i];

        // Retrieve a pointer to a list of current statistics
        // for the publishing point.
        CurrentCounters = PubPoint.CurrentCounters;
    }
}
catch (COMException comExc) {
    // TODO: Handle COM exceptions.
}
catch (Exception e) {
    // TODO: Handle exceptions.
}

See Also

Reference

IWMSPublishingPoint Object (C#)

Concepts

Server Object Model (C#)