Version py 3.9.7
- To better understand this, check out the sequence of socket API calls and data flow for TCP:
- To better understand this, check out the sequence of socket API calls and data flow for UDP:
-
Selective Repeat ARQ is also known as the Selective Repeat Automatic Repeat Request. It is a data link layer protocol that uses a sliding window method. The Go-back-N ARQ protocol works well if it has fewer errors. But if there is a lot of error in the frame, lots of bandwidth loss in sending the frames again. So, we use the Selective Repeat ARQ protocol. In this protocol, the size of the sender window is always equal to the size of the receiver window. The size of the sliding window is always greater than 1.
-
If the receiver receives a corrupt frame, it does not directly discard it. It sends a negative acknowledgment to the sender. The sender sends that frame again as soon as on the receiving negative acknowledgment. There is no waiting for any time-out to send that frame. The design of the Selective Repeat ARQ protocol is shown below.
# Clone the repository
$ git clone https://github.com/bsharabi/Chat_py.git
# Go into the repository
$ cd Chat_py
# Open the terminal on Windows
$ Run "py .\server\Controller.py <host> <port>"
# Open the terminal on Linux
$ Run "python .\server\Controller.py <host> <port>"
# Example
$ Run "py .\server\Controller.py localhost 3000"
It is possible to run in the following way without arguments and the default value is:
host = localhost
port = 3000
# Example
$ Run "py .\server\Controller.py"
# Clone the repository
$ git clone https://github.com/bsharabi/Chat_py.git
# Go into the repository
$ cd Chat_py
# Open the terminal on Windows
$ Run "py .\client\Controller.py"
# Open the terminal on Linux
$ Run "python .\client\Controller.py"
# Clone the repository
$ git clone https://github.com/bsharabi/Chat_py.git
# Go into the repository
* first:
You must first run the server (use the steps above)
-----------------------------------------------------
* Second:
you need to run the client (use the steps above)
Note that the choice of host and port is the same between the two parties