"state" meaning in Client API and Server Info query issue

Hi Michael,

I'm developing an tool in scenario to auto connect the vhusb, when implementing the Client API, I have a few questions:

1. GET CLIENT STATE return server nodes connection and device , what is the "state" attribute value represent? according to my observation, 1 should be non-connected, 3 for in use by you, 4 for in use by other, but I don't see a office explanation in this doc link, and I've search the forum but seems got nothing relative about this.

2. SERVER INFO can only pass server name to query the info? I've try that if I rename to a empty string "", will cause wired behavior (sometimes can get correct info, some get nothing). Could this query API use a host and IP to specify a hub ?

3. SERVER RENAME, seem can only rename by <hostname>:<port>, not <ip>:<port>?

4. after calling SERVER RENAME, then call GET CLIENT STATE to get the latest value, but it do not return the new one, actually still return the old name

It would be great if you can give me some feedback or solution advice, thanks!

#2

1. Connection: CONNECTED = 1, LOGGED_IN = 2, CONNECTING = 4, CLOSED = 8 These values are bitwise anded to get the current connection state.

E.g 1 & 2 = 3 (State 3 = the client is connected and logged into the server)

Device: DISCONNECTED = 0 ,CONNECTED = 1, BOUND = 2 These values are also bitwise anded to get the current device state

E.g State 1 = Device is connected but no client is using it, State 3 = the device is connected and its bound to a client

2. Yes the reason that server name is used is because the server ip address can be quite variable. The name normally doesnt change so its easier to refer to it in scripts

3. Yes this is a similar reason as 2. However it should accept an empty name, in the api response it will return an empty string as the server name, but in the GUI it will show the serial number of the server. This is so the GUI doesn't show nothing for an empty name as that would be confusing.

4. My guess is that the SERVER RENAME call didnt go through did it say "OK" as a response?