Node:Connecting to the Server, Next:, Previous:Simple Data Types, Up:Fundamentals



Connecting to the Server

The client-server dialog consists of two phases, establishing the connection and the LysKOM session itself.

A connection to the server is initiated by connecting to the appropriate network port1 and sending a single letter which is used to select a protocol version. This letter should always be A2.

The protocol version letter should be followed by connection information required by that protocol. In protocol A the connection information is a HOLLERITH string saying who the user connecting is followed by a newline character.

The format of the string should be username % hostname.

When the server has accepted the connection it replies with the string LysKOM on a single line.

        % telnet kom.lysator.liu.se 4894
        Trying 130.236.254.151 ...
        Connected to varg.lysator.liu.se.
        Escape character is '^]'.
        A26Hbyers%kajsa.lysator.liu.se
        LysKOM

Besides the string LysKOM, the server may respond with %%LysKOM unsupported protocol. or %% No connections left..

The %%LysKOM unsupported protocol. reply is sent if the server does not understand the requested protocol, that is, if the first character is anything but an A. The connection will be closed by the server as soon as this string has been sent.

The %% No connections left. reply is sent if the server is not accepting additional connections. This error is transient. The next connection attempt may succeed. Clients should wait a few seconds before attempting to make another connection after receiving this error. The connection will be closed by the server as soon as this string has been sent.


Footnotes

  1. The default port for a LysKOM server is 4894.

  2. In the early 1990s there was much discussion about the next generation LysKOM protocol, called ``Protocol B'', and at one point in time it was believed that ``Protocol B'' would arrive at the same time as ``Emacs 19''. ``Emacs 19'' arrived and was obsoleted by new versions. Meanwhile, it was discovered that ``Protocol A'' was more extensible that first believed. ``Protocol A'' will continue to evolve, but it is unlikely that it will ever be superseded by ``Protocol B''.