Share via


IWMSPublishingPointTotalCounters Object (C#)

banner art

Previous Next

IWMSPublishingPointTotalCounters Object (C#)

You can use the IWMSPublishingPointTotalCounters object to retrieve totals for the number of connections to the server and the amount of bandwidth allocated to connections.

The IWMSPublishingPointTotalCounters object exposes the following properties and methods.

Property Method
Advertisements Retrieves the cumulative number of advertisements that have been streamed from playlists since the last reset.
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 since the last reset.
CountersStartTime Retrieves the date and time at which the publishing point started monitoring the total counters.
FileBytesRead Retrieves the total number of bytes read from the publishing point since the last reset.
LateReads Retrieves the total number of read operations that took over 400 milliseconds.
OutgoingDistributionBytesSent Retrieves the total number of bytes sent to distribution connections since the last reset.
OutgoingDistributionConnections Retrieves the total number of distribution connections established since the last reset.
PlayerBytesSent Retrieves the total number of bytes sent to players since the last reset.
StreamDenials Retrieves the total number of denied stream transmissions since the last reset.
StreamErrors Retrieves the total number of dropped-packet errors since the last reset.
StreamingPlayers Retrieves the total number of players that have streamed data from the publishing point since the last reset.
StreamingHTTPPlayers Retrieves the total number of players that have streamed data by using the HTTP protocol from the publishing point since the last reset.
StreamingRTSPPlayers Retrieves the total number of players that have streamed data by using the RTSP protocol from the publishing point since the last reset.
StreamingUDPPlayers Retrieves the total number of players that have streamed data by using the User Datagram Protocol (UDP) from the publishing point since the last reset.
StreamTerminations Retrieves the total number of stream transmissions that have been terminated since the last reset.
Method Description
Reset Resets the counters to the current values.

Example Code

The following example illustrates how to retrieve an IWMSPublishingPointTotalCounters object.

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

// Declare variables.
WMSServer                            Server;
IWMSPublishingPoints                 PubPoints;
IWMSPublishingPoint                  PubPoint;
IWMSPublishingPointTotalCounters     TotalCounters;

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 total statistics
        // for the publishing point.
        TotalCounters = PubPoint.TotalCounters;
    }
}
catch (COMException comExc) {
    // TODO: Handle COM exceptions.
}
catch (Exception e) {
    // TODO: Handle exceptions.
}

See Also

Previous Next