×
Jinxia Li

Encapsulation & Implementation

No Comments

Encapsulation: The lower layers encapsulate the higher layers, data being repackaged at each layer.

Client-Side: Web browser sends an HTTP request

1) User type data into the a web form

2) A web browser program reads the data into its memory and then passes it to HTTP client

3) HTTP client receives data and pack it into an HTTP request

4) The TCP program layer in the client accepts data from HTTP client, divides it into chunks, and adds a TCP header creating a TCP segment.

5) The TCP segment is then encapsulated into an Internet Protocol (IP) datagram, and exchanged with peers.

Server-Side: Web server send an HTTP response

1) when a web server sends an HTML to a client , it uses the HTTP to do so. The server side HTTP program layer asks the TCP layer to set up the connection and send the file. 

2) The TCP stack divides the file into data packets, numbers them and then forwards them individually to the IP layer for delivery. 

Implementation:

Server-Side:

1) The back-end of your web application interfaces with HTTP Server. (Have HTTP server installed or implemented in your application. )

2) HTTP Server interfaces with TCP server, when a web server sends an HTML file to a client, it uses the hypertext transfer protocol (HTTP) to do so. The HTTP program layer asks the TCP layer to set up the connection and send the file. 

3) TCP server interfaces with IP server.

Client-Side:

1) The front-end of your web application interfaces with browser engine,

2) browser engine interfaces with HTTP client,

3) HTTP client interfaces with TCP,

4) TCP client interfaces with IP client.

Reference:

https://searchnetworking.techtarget.com/definition/TCP

https://developer.mozilla.org/en-US/docs/Learn/Forms

How do TCP/IP and HTTP work together?

https://stackoverflow.com/questions/46794420/how-do-tcp-ip-and-http-work-together

Leave a Comment

Your email address will not be published. Required fields are marked *

By commenting you accept the Privacy Policy