src/Doc/System/Server.thy
changeset 69464 2323dce4a0db
parent 68957 eef4e983fd9d
child 69593 3dda49e08b9d
equal deleted inserted replaced
69463:6439c9024dcc 69464:2323dce4a0db
   181   \medskip Subsequently, the protocol message formats are described in further
   181   \medskip Subsequently, the protocol message formats are described in further
   182   detail.
   182   detail.
   183 \<close>
   183 \<close>
   184 
   184 
   185 
   185 
   186 subsection \<open>Byte messages\<close>
   186 subsection \<open>Byte messages \label{sec:byte-messages}\<close>
   187 
   187 
   188 text \<open>
   188 text \<open>
   189   The client-server connection is a raw byte-channel for bidirectional
   189   The client-server connection is a raw byte-channel for bidirectional
   190   communication, but the Isabelle server always works with messages of a
   190   communication, but the Isabelle server always works with messages of a
   191   particular length. Messages are written as a single chunk that is flushed
   191   particular length. Messages are written as a single chunk that is flushed
   279 
   279 
   280 subsection \<open>Initial password exchange\<close>
   280 subsection \<open>Initial password exchange\<close>
   281 
   281 
   282 text \<open>
   282 text \<open>
   283   Whenever a new client opens the server socket, the initial message needs to
   283   Whenever a new client opens the server socket, the initial message needs to
   284   be its unique password. The server replies either with \<^verbatim>\<open>OK\<close> (and some
   284   be its unique password as a single line, without length indication (i.e.\ a
   285   information about the Isabelle version) or by silent disconnection of what
   285   ``short message'' in the sense of \secref{sec:byte-messages}).
   286   is considered an illegal connection attempt. Note that @{tool client}
   286 
   287   already presents the correct password internally.
   287   The server replies either with \<^verbatim>\<open>OK\<close> (and some information about the
       
   288   Isabelle version) or by silent disconnection of what is considered an
       
   289   illegal connection attempt. Note that @{tool client} already presents the
       
   290   correct password internally.
   288 
   291 
   289   Server passwords are created as Universally Unique Identifier (UUID) in
   292   Server passwords are created as Universally Unique Identifier (UUID) in
   290   Isabelle/Scala and stored in a per-user database, with restricted
   293   Isabelle/Scala and stored in a per-user database, with restricted
   291   file-system access only for the current user. The Isabelle/Scala server
   294   file-system access only for the current user. The Isabelle/Scala server
   292   implementation is careful to expose the password only on private output
   295   implementation is careful to expose the password only on private output