This directory contains some experimental code that allows us to see plain TCP socket-based application, a simple HTTP web application, an AJAX-based

susam / lab

submited by
Style Pass
2021-06-06 16:00:05

This directory contains some experimental code that allows us to see plain TCP socket-based application, a simple HTTP web application, an AJAX-based application, and a WebSocket-based application in action and study the underlying application layer payloads that are exchanged between the client and the server while each application.

All code here is minimal in nature. No encryption is used. There is very little error handling. The objective here is limited to comparing only the application layer payloads resulting from the various programs.

To see only what the payloads look like for each example application, go to section Payloads. To run the example programs on your system, continue reading with the next section.

The programs in this directory implement very simple and minimal server programs that send the server's current time to the client. The same functionality is implemented in four different ways:

As a TCP socket program (tcpapp.py): The server program listens on a TCP port. A client connects to it. The server responds with the current time on the server in the welcome message. The client can request for the current time anytime by sending a message. The server program is extremely simple on purpose and handles all incoming connections sequentially. The focus here is on inspecting the packet traffic, not developing a robust server program. This became a popular way of developing network applications in the 1980s. The technology behind this approach has its roots in Berkeley sockets that was introduced in 1983. This was later standardized in the POSIX socket API. The example program here uses Python's standard library socket module that provides access to the Berkeley socket interface.

Leave a Comment
Related Posts