Node:disconnect, Next:, Previous:get-session-info, Up:Protocol Requests



disconnect [55] (1) Recommended


        disconnect [55] ( session-no : Session-No )
                -> ( );

This call disconnects the session session-no from the LysKOM server. A session can always disconnect itself, even without logging in. If the session is logged in as user foo it can also disconnect any session logged in as a person for which foo is the supervisor.

Session number zero is always interpreted as the session making the call, so the easiest way to disconnect the current session is to disconnect session zero.

Example:

        1 56
        =1 7
        1 55 7
        =1
        :2 13 8 7
        Connection closed by foreign host.

In this example the client asks for its own session number, then disconnects itself (disconnection session 0 would have had the same effect.) The asynchronous message sent just before the session is disconnected is the logout message for the user that was logged on in the session. The "Connection closed by foreign host." is not part of the server output. This message was generated by telnet.

Error codes

login-first
Login required before issuing this call if session-no is not the session issuing the call.
permission-denied
Attempt to disconnect another session and not supervisor of person logged in and not enough privileges set and enabled to complete the call anyway.
undefined-session
The session session-no does not exist.