Compartir a través de


IWMSServerCurrentCounters Interface

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

In addition to the methods inherited from IDispatch, the IWMSServerCurrentCounters interface exposes the following methods.

Method

Description

get_AllCounters

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

get_CacheDownloads

Retrieves the number of streams being sent to a cache.

get_ConnectedPlayers

Retrieves the number of players connected to the server.

get_ConnectionQueue

Retrieves the current number of players in the queue to connect to the server.

get_ConnectionRate

Retrieves the number of players connecting per second.

get_FileReadRate

Retrieves the current bandwidth consumed by file read operations.

get_IncomingBandwidth

Retrieves the current bandwidth allocated for incoming connections.

get_LateReadRate

Retrieves the number of late read operations per second.

get_LateSendRate

Retrieves the number of late send operations per second.

get_OutgoingDistributionAllocatedBandwidth

Retrieves the bandwidth that has been allocated for distribution connections.

get_OutgoingDistributionConnections

Retrieves the number of server distribution connections.

get_OutgoingDistributionSendRate

Retrieves the rate, in Kbps, at which content is being sent to distribution connections.

get_PlayerAllocatedBandwidth

Retrieves the bandwidth allocated for player connections.

get_PlayerSendRate

Retrieves the rate, in Kbps, at which content is being sent to players.

get_StreamErrorRate

Retrieves the number of dropped packets per second.

get_StreamingHTTPPlayers

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

get_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.)

get_StreamingPlayers

Retrieves the number of players receiving streamed content.

get_StreamingRTSPPlayers

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

get_StreamingUDPPlayers

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

get_UDPResendRequestsRate

Retrieves the number of UDP resend requests per second received by the server.

get_UDPResendsSentRate

Retrieves the number of UDP resend requests per second processed by the server.

Example

The following example illustrates how to retrieve a pointer to an IWMSServerCurrentCounters interface.

#include <windows.h>
#include "wmsserver.h"

// Declare variables and interfaces.
IWMSServer                  *pServer;
IWMSServerCurrentCounters   *pCurrentCounters;

HRESULT         hr;

// Initialize the COM library and retrieve a pointer
// to an IWMSServer interface.
hr = CoInitialize(NULL);
hr = CoCreateInstance(CLSID_WMSServer,
                      NULL,
                      CLSCTX_ALL,
                      IID_IWMSServer,
                      (void **)&pServer);
if (FAILED(hr)) goto EXIT;

// Retrieve a pointer to a list of current statistics
// for the server.
hr = pServer->get_CurrentCounters(&pCurrentCounters);
if (FAILED(hr)) goto EXIT;

EXIT:
    // TODO: Release temporary COM objects and uninitialize COM.

See Also

Reference

IWMSServer Interface

Concepts

Server Object Model Interfaces (C++)