Previous page

Next page

Locate page in Contents

Print this page

count_registered

Summary:

Provides information about the clients that are currently registered with the Agent. Used with the register_client call to implement licensing functionality in the client software.

Request specification:

Name

Min/Max

Type

Description

count_registered

 

 

 

{

 

 

 

id

0..1

string

Client ID (see register_client). If the element is omitted, the information for all registered clients will be retrieved.

}

 

 

 

Returns:

Name

Min/Max

Type

Description

registered

0..[]

 

Client connection information.

{

 

 

 

id

1..1

string

Client ID.

count

1..1

int

The number of existing connections from this client.

}

 

 

 

Description:

The count_registered call and the register_client call are used together. They allow to keep track of the logged clients and to limit the number of concurrent connections from the same client by granting or denying a new connection based on the number of connections that already exist. The following describes a typical usage scenario.

As soon as a client establishes a connection with the Agent, use the count_registered call to get the number of currently registered clients with the same ID. Depending on the result, one of the following should happen:

It is not necessary to unregister the connection when the client logs off, as Agent does that automatically.

Example:

Input

<packet version="4.0.0">

<target>sessionm</target>

<data>

<sessionm>

<count_registered/>

</sessionm>

</data>

</packet>

Output

<ns1:packet xmlns:ns2="http://www.swsoft.com/webservices/vzl/4.0.0/sessionm" xmlns:ns1="http://www.swsoft.com/webservices/vzl/4.0.0/protocol" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="1ac46926d8ft7e87r3c4" time="2007-07-09T17:35:50+0000" priority="0" version="4.0.0">

<ns1:origin>sessionm</ns1:origin>

<ns1:target>vzclient3-1b7066f2-950e-d142-8a56-dff57c5a305a</ns1:target>

<ns1:dst>

<ns1:director>gend</ns1:director>

</ns1:dst>

<ns1:data>

<ns2:sessionm>

<ns2:registered>

<ns2:id>license_id_333</ns2:id>

<ns2:count>2</ns2:count>

</ns2:registered>

</ns2:sessionm>

</ns1:data>

<ns1:src>

<ns1:director>gend</ns1:director>

</ns1:src>

</ns1:packet>

Please send us your feedback on this help page