Sockets and streams
In distributed computing, network communication is one of the essential parts of any system, and the socket is the endpoint of every instance of network communication. In Java communication, it is the most critical and basic object involved. You may have seen browsers connect and communicate with the server through URLs over an HTTP protocol. Now, this is a high-level connection mechanism for accessing resources over the internet using URL and URLConnection. However, when huge amounts of data need to be exchanged in a secure way, then this method is not as performant as low-level data exchange. The reason is that every URL works on character streams, whereas low-level data exchange supports raw binary data exchange. Also, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access