Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nelsonkariuki/multithreaded-websever-and-client

Multithreaded server that is capable of serving multiple requests simultaneously. Using threading, first create a main thread in which your modified server listens for clients at a fixed port. When it receives a TCP connection request from a client, it will set up the TCP connection through another port and services the client request in a separate thread.
https://github.com/nelsonkariuki/multithreaded-websever-and-client

Last synced: 2 days ago
JSON representation

Multithreaded server that is capable of serving multiple requests simultaneously. Using threading, first create a main thread in which your modified server listens for clients at a fixed port. When it receives a TCP connection request from a client, it will set up the TCP connection through another port and services the client request in a separate thread.

Awesome Lists containing this project

README

        

# Multithreaded-Webserver-and-Client
Environment
Python 3+
Mozilla firefox 41.0.2
Windows/linux command prompt

Running the program in terminal

Run python3 webserver.py 8080 this listens for client requests

Running webserver.py on python IDE ie visual code terminal
On Python 3+ IDE--->open--- run
Testing in browser
http://127.0.0.1:8080/test.html

If file name is different 404 is sent
Running client.py on terminal
python3 client.py localhost test.html
On firefox search enter the followuing url

127.0.0.1:8080/test.html
when you enter the wrong url it gives error 404
ie http:127.0.0.1:8080/test.ht

Also wrong port number brings an error