Now that we've seen the client, let's look at the server.
The client used ConnectAttach() to create a connection
to a server, and then used MsgSend() for all its message passing.
Creating the channel
This implies that the server has to create a channel—this is the thing that the client connected to when it issued the ConnectAttach() function call. Once the channel has been created, the server usually leaves it up forever.
Message handling
As far as the message-passing aspects are concerned, the server handles message passing in two stages; a receive stage and a reply stage.
Server framework
Here we show the overall structure of a server.