Skip to content

Latest commit

 

History

History
37 lines (29 loc) · 1.64 KB

File metadata and controls

37 lines (29 loc) · 1.64 KB

Simple client-server programs, written in python

Here, 'mysocket.py' represents the client, which is a simple python program written using the socket module The 'myserver.py' represents the server, written again using only the socket module

You'll have to initially run the 'myserver.py' program, following which, you can run the 'mysocket.py' program in a different window any number of times

No matter what 'mysocket.py' requests for, 'myserver.py' is going to send it a 'Hello Word' html file


image
Initialized the server

image
Ran the client, and received a 'Hello World' html file

image
The 'GET' request the server received from the client just now

image
If you open localhost:9000 on your browser, you see the html from the server response formatted out

image
The 'GET' requests the server received due to above action. It'll now continually wait for favicon, which will never be sent by the program we've written