Client number as set by message passer

Namespace:  Equis.JanusToolkit
Assembly:  Janus (in Janus.dll)

Syntax

C#
public static int ClientNumber { get; internal set; }

Return Value

client number

Remarks

This value is set by the TimeLineServer and should not be modified. ClientNumber contains an integer which represents the clients connection number on the time line server. The first client to connect to the server will be 0. The next client will be 1, etc. If a client disconnects from the server, that client number will be freed up and may be reused by the next client to connect to the time line server.

Examples

 Copy imageCopy Code
               protected override void Initialize()
              {
                   
                  // create a couple of time lines
                  playerPosition = new TankStatusTimeLine[2];
                  playerPosition[0] = new TankStatusTimeLine("position-0");
                  playerPosition[1] = new TankStatusTimeLine("position-1");
                  
                  // determine if this client is player 0 or player 1
                  int playerNumber = Janus.ClientNumber; 
                  
             }
            

See Also