multithreaded_web_server's Introduction
Building a Simple Web Client and a Multithreaded Web Server Steps for execution: 1. Extract the zip file. It contains six files viz., server.py, client.py, index.html, index.htm, default.html and Readme.txt 2. server.py and client.py are the files containing the source codes. 3. Open two python terminals windows, and change the working directory to the extracted folder using the command 'cd <file_path>'. 4. In the first terminal window, run the server code using the command 'python server.py <port_no>'. If the command line argument <port_no> is not given, the default port 8080 will be assigned. Now the server will start and it will keep running. 5. In the second terminal window, run the client code using the command 'python client.py <server_name> <file_name> <port_no>'. If the command line argument <server_name> is not given, the default name 'localhost' is assigned. If the command line argument <file_name> is not given, the default name 'index.html' is assigned. If the command line argument <port_no> is not given, the default port 8080 will be assigned. 6. You can see the output in both the terminal windows. 7. To give an http request from the browser, open any web browser and type 'http://localhost:8080/<file_name>'. If <file_name> is not specified, the server will redirect you to a default page. 8. You can also test the code by entering the full path of the file provided the file is in the same directory as the folder. This can be done by 'http://localhost:8080/<full_path>'. Code References: 1. https://wiki.python.org/moin/BaseHttpServer 2. https://docs.python.org/3/library/http.server.html 3. http://pymotw.com/2/BaseHTTPServer/index.html#module-BaseHTTPServer 4.http://stackoverflow.com/questions/15518534/simple-http-client-and-server-in-python-but-client-making-atleast-50-request-sim Software Required: 1. Python 2.7.9
multithreaded_web_server's People
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.