From 676e24e78da6a87884659415cb4da88137792fe4 Mon Sep 17 00:00:00 2001 From: Lars Simon Winzer Date: Mon, 9 Mar 2026 18:59:35 +0100 Subject: [PATCH] Add: Table of contents and 'The Language of the Network' section --- documents/docs/blog/09-03-26_Network.md | 39 +++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/documents/docs/blog/09-03-26_Network.md b/documents/docs/blog/09-03-26_Network.md index c83c7a1..e1ee3a4 100644 --- a/documents/docs/blog/09-03-26_Network.md +++ b/documents/docs/blog/09-03-26_Network.md @@ -1,4 +1,8 @@ # Table of Contents +- [Table of Contents](#table-of-contents) +- [Introduction](#introduction) + - [Formal concepts of networking](#formal-concepts-of-networking) + - [The Language of the Network](#the-language-of-the-network) # Basics @@ -19,3 +23,38 @@ The **Client-Server** model evolved into the sophisticated "web-services" we kno One central powerful computer (the server) stores data and allows external devices (clients) to access it. For our course "Programmierprojekt" we are required to use the Client-Server model. + +## The Language of the Network +To communicate over the network, we first need to establish a few rules. + +If we look at the real world, language also follows certain rules: + +* Grammar +* Meaning of Words + +In computer science, these rules are known as a "protocol." Everyone must follow these rules, because if not, the program we want to communicate with wouldn’t understand us, or in the worst case, misunderstand us. + +For our network, we’ve decided to build upon the Post Office Protocol (POP) version 3. It follows the request-response model, is synchronous, and meets our requirements. + +An example of a request and response (for our game) might look like this: + +1. Request + ```text + GET_DELTA 42 + ``` + +2. Response + ```text + +OK + PLAYER_FOLDED playerId=3 + POT 240 + NEXT_TURN playerId=1 + WHISPER from=player2 msg="hey" + CHAT_LOBBY player3="hello" + . + ``` + +The client requests the occurred actions since the 42nd state. + +The server responds with all the actions other players have made and the messages the client has received. +