From 82c23149362fb5606f10afa483b4a35845b05f5d Mon Sep 17 00:00:00 2001 From: Armando Santos Date: Tue, 15 Jun 2021 16:28:10 +0100 Subject: [PATCH] Fixed Req/Rep protocol documentation --- docs/network-spec/miniprotocols.tex | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/docs/network-spec/miniprotocols.tex b/docs/network-spec/miniprotocols.tex index 12cfd69385b..87158451a1b 100644 --- a/docs/network-spec/miniprotocols.tex +++ b/docs/network-spec/miniprotocols.tex @@ -310,6 +310,7 @@ \subsection{Request Response Protocol} \renewcommand{\StDone}{\state{StDone}} \newcommand{\Request}{\msg{MsgReq}} \newcommand{\Response}{\msg{MsgResp}} +\newcommand{\RespDone}{\msg{MsgDone}} \subsubsection{Description} The request response protocol is polymorphic in the request and response data that is being transmitted. @@ -328,10 +329,11 @@ \subsubsection{State machine} \tikzstyle{every state}=[fill=red,draw=none,text=white] \node[state, green, initial] (Idle) {\StIdle}; \node[state, blue, right of=Idle] (Busy) {\StBusy}; - \node[state, right of=Busy] (Done) {\StDone}; + \node[state, below of=Idle] (Done) {\StDone}; - \draw (Idle) edge[] node{\Request} (Busy); - \draw (Busy) edge[] node{\Response} (Done); + \draw (Idle) edge[below, bend right] node{\Request} (Busy); + \draw (Busy) edge[above, bend right] node{\Response} (Idle); + \draw (Idle) edge[right] node{\RespDone} (Done); \end{tikzpicture} {\vskip 10pt} The protocol uses the following messages. @@ -340,13 +342,16 @@ \subsubsection{State machine} The client sends a request to the server. \item [\Response{} $(response)$] The server replies with a response. +\item [\RespDone{} $(done)$] + Terminate the protocol. \end{description} \begin{tabular}{|l|l|l|l|} \hline \multicolumn{4}{|c|}{Transition table} \\ \hline - from & message & parameters & to \\ \hline\hline + from & message & parameters & to \\ \hline\hline \StIdle & \Request & $request$ & \StBusy \\ \hline - \StBusy & \Response & $response$ & \StDone \\ \hline + \StBusy & \Response & $response$ & \StIdle \\ \hline + \StIdle & \RespDone & & \StDone \\ \hline \end{tabular} \section{Handshake Mini Protocol}