Java socket support for HTTP client/server applications
An HTTP client will make a connection to an HTTP server. The client will send a request message to the server. The server will send back a response message, frequently, as an HTML document. In the early HTTP version, once the response was sent, the server would terminate the connection. This is sometimes referred to as a stateless protocol because the connection is not maintained.
With HTTP/1.1, persistent connections can be maintained. This improves the performance by eliminating the need to open and close connections when multiple pieces of data need to be transferred between the server and a client.
We will focus on creating an HTTP server and an HTTP client. While browsers typically serve ...
Get Learning Network Programming with Java now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.