IWMSServerCurrentCounters Object (C#)

banner art

Previous Next

IWMSServerCurrentCounters Object (C#)

You can use the IWMSServerCurrentCounters object to retrieve real-time information about the number of connections to the server and the amount of bandwidth allocated to those connections.

The IWMSServerCurrentCounters object exposes the following properties.

Property Description
AllCounters Retrieves an array that contains all of the counters supported by the object.
CacheDownloads Retrieves the number of streams being sent to a cache.
ConnectedPlayers Retrieves the number of players connected to the server.
ConnectionQueue Retrieves the current number of players in the queue to connect to the server.
ConnectionRate Retrieves the number of players connecting per second.
FileReadRate Retrieves the current bandwidth consumed by file read operations.
IncomingBandwidth Retrieves the current bandwidth allocated for incoming connections.
LateReadRate Retrieves the number of late read operations per second.
LateSendRate Retrieves the number of late send operations per second.
OutgoingDistributionAllocatedBandwidth Retrieves the bandwidth that has been allocated for distribution connections.
OutgoingDistributionConnections Retrieves the number of server distribution connections.
OutgoingDistributionSendRate Retrieves the rate, in Kbps, at which content is being sent to distribution connections.
PlayerAllocatedBandwidth Retrieves the bandwidth allocated for player connections.
PlayerSendRate Retrieves the rate, in Kbps, at which content is being sent to players.
StreamErrorRate Retrieves the number of dropped packets per second.
StreamingHTTPPlayers Retrieves the total number of players receiving streamed content using the HTTP protocol.
StreamingMMSPlayers Retrieves the total number of players receiving streamed content using the MMS protocol. (The MMS protocol is not supported in Windows Server 2008 operating systems.)
StreamingPlayers Retrieves the number of players receiving streamed content.
StreamingRTSPPlayers Retrieves the number of players receiving streamed content using the RTSP protocol.
StreamingUDPPlayers Retrieves the number of players receiving streamed content using the User Datagram Protocol (UDP).
UDPResendRequestsRate Retrieves the number of UDP resend requests received by the server.
UDPResendsSentRate Retrieves the number of UDP resend requests processed by the server.

Example Code

The following example illustrates how to retrieve an IWMSServerCurrentCounters object.

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









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

See Also

Previous Next