IWMEncNetConnectionStats.ClientCount
The ClientCount property retrieves the number of clients connected to the encoding application.
Syntax
int = IWMEncNetConnectionStats.ClientCount;
Parameters
This property takes no parameters.
Property Value
An Int32 that indicates the number of connected clients.
Remarks
An encoding application can unicast and multicast from a Windows Media server, and by default, up to five clients can connect directly to the computer hosting the encoding application. Administrators can change this limit to a maximum limit of 50 connections. For more information, see Controlling Client Connections.
Example Code
using WMEncoderLib;
try
{
// Declare objects and variables.
IWMEncStatistics Stats;
IWMEncNetConnectionStats NetStats;
int lClients;
string sAddr;
int i;
// Retrieve an IWMEncStatistics object and an IWMEncNetConnections
// object.
Stats = Encoder.Statistics;
NetStats = (IWMEncNetConnections)Stats.NetConnectionStats;
// Retrieve the number of clients connected.
lClients = NetStats.ClientCount;
// Retrieve the IP address of each client.
for (i=0; i< lClients; i++)
{
sAddr = NetStats.get_ClientInfo(i, out WMENC_BROADCAST_PROTOCOL);
}
}
catch (Exception e)
{
// TODO: Handle exceptions.
}
Requirements
Reference: Windows Media Encoder
Namespace: WMEncoderLib
Assembly: Interop.WMEncoderLib.dll
Library: WMEncoderLib.dll
See Also