Share via


IWMSServerPeakCounters Object (C#)

You can use the IWMSServerPeakCounters object to retrieve properties that contain information about peak events that occur during server operation.

The IWMSServerPeakCounters object exposes the following properties and methods.

Property

Description

AllCounters

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

ConnectedPlayers

Retrieves the maximum number of players that have simultaneously connected to the server since the last reset.

CountersStartTime

Retrieves the date and time at which the server started monitoring the peak counters.

OutgoingDistributionAllocatedBandwidth

Retrieves the maximum bandwidth allocated to distribution connections since the last reset.

OutgoingDistributionConnections

Retrieves the maximum number of simultaneous distribution connections since the last reset.

OutgoingDistributionSendRate

Retrieves the maximum number of bytes per second sent to distribution connections since the last reset.

PlayerAllocatedBandwidth

Retrieves the maximum bandwidth allocated to player connections since the last reset.

PlayerSendRate

Retrieves the maximum number of bytes per second sent to player connections since the last reset.

StreamingPlayers

Retrieves the maximum number of players that received content from the server simultaneously since the last reset.

StreamingHTTPPlayers

Retrieves the maximum number of players that received content by using the HTTP protocol from the server simultaneously since the last reset.

StreamingRTSPPlayers

Retrieves the maximum number of players that received content by using the RTSP protocol from the server simultaneously since the last reset.

StreamingUDPPlayers

Retrieves the maximum number of players that received content by using the User Datagram Protocol (UDP) from the server simultaneously since the last reset.

Method

Description

Reset

Resets the counters to the current values.

Example

The following example illustrates how to retrieve an IWMSServerPeakCounters object.

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

// Declare variables.
WMSServer                  Server;
IWMSServerPeakCounters     PeakCounters;

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

    // Retrieve a list of peak statistics for the server.
    PeakCounters = Server.PeakCounters;
}
catch (COMException comExc) {
    // TODO: Handle COM exceptions.
}
catch (Exception e) {
    // TODO: Handle exceptions.
}

See Also

Reference

IWMSServer Object (C#)

Concepts

Server Object Model (C#)