Skip to content
Snippets Groups Projects
Commit 93b4ae93 authored by Anders Märak Leffler's avatar Anders Märak Leffler
Browse files

Lab 1: Add helpful comment about \n

parent d692ad2d
No related branches found
No related tags found
No related merge requests found
...@@ -126,6 +126,8 @@ class Request(threading.Thread): ...@@ -126,6 +126,8 @@ class Request(threading.Thread):
# Threat the socket as a file stream. # Threat the socket as a file stream.
worker = self.conn.makefile(mode="rw") worker = self.conn.makefile(mode="rw")
# Read the request in a serialized form (JSON). # Read the request in a serialized form (JSON).
# Note how a line is supposed to end.
# https://docs.python.org/3.10/library/io.html#io.IOBase.readline
request = worker.readline() request = worker.readline()
# Process the request. # Process the request.
result = self.process_request(request) result = self.process_request(request)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment