Skip to content

Commit 26d15af

Browse files
authored
Update README.md
1 parent 1b3418a commit 26d15af

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@ A web proxy is a program that acts as a middleman between a Web browser and an e
3333
## How does proxy work?
3434

3535
It has the following detailed behavior:
36-
- Set up the proxy to accept incoming connections:
36+
- **Set up** the proxy to accept incoming connections:
3737
1) Proxy creates a listening descriptor that is ready to receive connection requests on port ***`port`*** by calling ***`Open_listenfd()`*** funciton defined in **`socket.c`** file.
3838

39-
- Set up the proxy to deal with multiple concurrent connections using **prethreading** technique:
39+
- **Set up** the proxy to deal with multiple concurrent connections using **prethreading** technique:
4040
1) After initializing buffer ***`sbuf`*** declared in **`sbuf.h`** file, the main thread creates the set of worker threads by calling ***`Pthread_create()`*** defined in **`thread.c`** file.
4141
2) Main thread then enters an infinite loop, waiting for connection requests using ***`Accept()`*** function defined in **`socket.c`** file.
4242
3) It then inserts the resulting connected descriptors in ***`sbuf`***.
4343
4) Each worker thread waits until it is able to remove a connected descriptor from the buffer and then calls the ***`serve_client()`*** function to serve the client.
44-
- Run ***`serve_client()`*** routine:
44+
- **Run** ***`serve_client()`*** routine:
4545
1) Read and parse the _HTTP_ request sent from the client by calling ***`read_HTTP_request()`*** function defined in **`serve.c`** file.
4646
2) using ***`hash()`*** function defined in **`cache.c`** file, generate ***`HTTP_request_hash`*** that will be used to check if the cache contains the requested web object.
4747
3) If the object is cached then read the object out of the cache rather than communicating again with the server by calling ***`service_from_cache()`*** function defined in **`service.c`** file.

0 commit comments

Comments
 (0)