Sending a disconnect client request to a server

disconnect_client()

Send a disconnect client request to a server


SYNTAX

disconnect_client(server, port, client_id, random_id)

Connects to the specified Sculptor server if not already connected and then then sends a disconnect client request.

The port, client_id and random_id arguments must match the corresponding values returned by the get_client_info() function.

If successful the designated client is forcibly disconnected by kfserver. If that client had an open transaction, the transaction is rolled back. A program cannot use this function to disconnect itself.

Return values from the function are:

< 0

Cannot connect to server.

0

Successful.

> 0

port or client_id not valid.

This function can be used in conjunction with get_client_info() to recover after a socket error.


RELATED TOPICS

Servers

get_client_info()

sys.ServerRetries