Javarevisited

A humble place to learn Java and Programming better.

Member-only story

Do you know about Websockets and what are they used for?

--

Image Source: https://fjolt.com/images/misc/20210522.png

Hello everyone. It's been a long time since I published my 70th article and here I am with my next interesting article in which we are going to learn about WebSockets. We will see what is a Socket in networking and see how is it different from WebSocket. Then we will compare WebSocket with HTTP protocol and understand their differences. We will then see how a WebSocket works and what are famous libraries to implement it. Toward the end, we will look at the vulnerabilities in WebSockets and how can we secure them. We will conclude this article by looking at the applications of WebSockets. Let's get started.

What is a Socket?

Image Source: https://i2.wp.com/ipwithease.com/wp-content/uploads/2020/06/port-vs-socket-dp.jpg?w=1000&ssl=1

A socket is one endpoint of a two-way communication link between two programs running on the network. This provides a means of inter-process communication (IPC) by establishing communication between. This is a very low-level thing and everything else is implemented on top of TCP sockets.

Image Source: https://i1.wp.com/ipwithease.com/wp-content/uploads/2018/01/162-ports-and-socket-explanation-02.png?w=862&ssl=1

--

--

Javarevisited
Javarevisited

Published in Javarevisited

A humble place to learn Java and Programming better.

Dineshchandgr - A Top writer in Technology
Dineshchandgr - A Top writer in Technology

Written by Dineshchandgr - A Top writer in Technology

Principal Software Engineer and Technical Lead focussed on Backend Engineering who likes to upgrade the tech skills and share knowledge to the community

Responses (3)