Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
litsakis committed Oct 3, 2017
1 parent a03f974 commit 6f50d2d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
A proxy Server - client model developed using C language


Running the entire proxy-server client model starts from the server.
The server creates a socket to be able to communicate with the client. You are still preparing to receive connections from all the interfaces to a port that you specify by
Running the entire proxy-server client model begins from the server.
The server creates a socket to be able to communicate with the client. It prepares to receive connections from a port that is specified by the user.
The server waits for a client to log in. Once logged in, he will create a copy of himself in the memory through the fork, which will read the client's message and serve it.

The client receives from the command line the name or address of the proxy server along with the port it listens to. It checks if there is a server and you connect with it.
It then reads the user's form (GET or GETNEW url)
The client receives from the command line the name or address of the proxy server along with the port it listens to. It checks if there is a server and connect with it.
It gets three commands from user (GET or GETNEW url)
Or (EXIT), which sends them to the proxy server. If the command given is EXIT terminates. Otherwise it expects to receive a response from the proxy server with the html.

The proxy server reads the message sent by the client and checks what command he sent. If the client gave the GET command then he searches to find if there is near the executable (in the same dir) the requested html, if he finds it reads it sends media socket back to the client. If you do not automatically call GETNEW (which I'll analyze below). If the client gave the GETNEW command then it creates a http request message.
It also creates a tcp connection to the web server by sending it http request.
The proxy server reads the message sent by the client and checks which command has received. If the client gave the GET command then he searches to find if there is near the executable (in the same dir) the requested html. If the server finds, it reads the file and returns it using socket back to the client.If there is not suitable html then calls GETNEW (which I'll analyze below). If the client gave the GETNEW command then it creates a http request message.
It also creates a tcp connection to the web server by sending a http request.
The webserver responds by sending an html. The html proxy server stores it in the same dir as the executable and sends it back to the client and kills the child serving the client.
The client in turn stores the html to be received in the same dir as the executable of the client with a name that will be requested by the user. and finally is ready to accept a new command!
The client in turn stores the html to be received in the same dir as the executable of the client with a name that will be requested by the user.

0 comments on commit 6f50d2d

Please sign in to comment.