Git Product home page Git Product logo

web-server-simulation's Introduction

web-serve-semulation

This is a simple project simulation of a real Web Server, Where it is possible to do multiple web request to a local server.

Main objective

The main objective is to simulate, more efficiently, the functionality of a web server.

Dependences/libraries use:

The libraries that i use are the following one's:

    import socket
    import request
    import Thread

Running & Debugging

The Web Server

To debug/run the web server, follow the steps:

1º - run the server script.

    python3 webserver.py

The output will be like this:

Port 3000: trying to connect.
Port 3000: already connected.

The server is under state active.

2º - Go to the browser and access the sites that are available in the server.

Examples: - http://localhost:3000/Facebook.html - http://localhost:3000/Google.html - http://localhost:3000/ArqRedes.html

The Client

To connect the server as a client, you have to run the client script:

    python3 client.py

the output will be a terminal where is possible to execute two commands.

The commands

  • To display the response code use:
    TCP/Server -> localhost 3000 -h ArqRedes.html
  • To display the contents of the html file:
    TCP/Server -> localhost 3000 -t ArqRedes.html

web-server-simulation's People

Contributors

robertocarlosmedina avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

uta-it-students

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.