IWMEncNetConnectionStats.ClientInfo

Windows Media Encoder SDK banner art

The ClientInfo property retrieves the protocol and IP address of a specific client.

Syntax

String = IWMEncNetConnection.ClientInfo(lIndex, Protocol)

Parameters

lIndex

[in]  Long containing the index identifying the client.

Protocol

[out]  Member of a WMENC_BROADCAST_PROTOCOL enumeration type indicating the type of protocol through which the client is connected.

Property Value

A String containing the IP address of the client, and a WMENC_BROADCAST_PROTOCOL enumeration type.

Remarks

You can use this method to monitor client connections. For instance, you can determine how many clients are connected from a specific range of IP addresses.

Example Code

' Declare objects and variables.
Dim Stats As IWMEncStatistics
Dim NetStats As IWMEncNetConnectionStats
Dim lClients As Long
Dim sAddr As String
Dim i As Integer

' Retrieve an IWMEncStatistics object and an IWMEncNetConnections
' object.
Set Stats = Encoder.Statistics
Set NetStats = Stats.NetConnectionStats

' Retrieve the number of clients connected to the encoding application.
lClients = NetStats.ClientCount

' Retrieve the IP address of each client.
For i = 0 To lClients
    sAddr = NetStats.ClientInfo(i, WMENC_PROTOCOL_HTTP)
Next i

Requirements

Reference: Windows Media Encoder

Library: wmenc.exe

See Also