![]() |
As defined in xcapi.h
| xerr xcMigrateSession( | xhandle session, |
| const char *server_list, | |
| const char *username, | |
| const char *password); |
Description:
Migrates an existing session to a different Exegy appliance, or allows the client to log in to the same appliance with new credentials. The function terminates the previously established connection with the appliance (represented by the session instance passed in as a parameter to the call) then attempts a new connection with the appliance(s) at the IP address(es) specified in the server_address parameter.
Note that if a new session cannot be established (after trying all submitted IP addresses), the function returns with an error. IT IS POSSIBLE TO LEAVE YOUR SESSION IN A DISCONNECTED STATE WITH THIS FUNCTION. Each server address in the supplied list will be tried once: if all of them fail, xcMigrateSession() will return with an error code. xcMigrateSession() will then have to be called again (perhaps with a different server_address parameter) to get the session back to a connected state.
Note that this function returns immediately, whether a new session is established or not. The callback function associated with the original session is called once when the old connection is terminated, and again if a new connection is established.
If the session, userid or password parameter values are supplied as NULL, no change is made to the currently active session, and the function returns XINVAL.
Restrictions:
Parameters:
Returns:
An xerr type indicating the status of the creation operation.
Common error codes:
XSUCCESS Connection and login to the Exegy appliance were successful.
XINVAL Invalid parameter.
XCONNREFUSED Connection refused.
XCONNRESET Connection reset by peer.
XADDR Connection failed due to bad address.
XSOCKET Unable to connect to specified socket.
XLOGINFAILED Connection refused due to incorrect login credentials.
XPROTO Connection failed because client and appliance could not negotiate a connection.
XTIMEOUT Active connection timed out.
XTIME Connection request timed out waiting for server response.
XVERSION Connection refused due to version mismatch (between Exegy appliance and XC API).
XBADHANDLE Invalid handle.