Android

WebSockets Servers 101

Let’s start listening…

listening for incoming socket connections. This is the very first thing that every server should do and to avoid potential problems with firewalls/proxies, let’s use the standard port 80.

So, what else should our WebSocket server be able to do?

WebSockets clients 101

Forget about frameworks for now…

There’s a lot of frameworks that support WebSockets, but the purpose of every framework is to speed up the process of building products by hiding all low level details underneath, the details which I believe are important to know (=understand).

You probably know that WebSockets allow you to establish real time communication between a webserver and its clients and what’s cool about it, is you can get a response without a need to request it (explicitly). If your app primarily broadcasts information to its clients (like weather forecasts) and there’s not much interactivity, then there are better options out there but if you need a bidirectional communication that happen simultaneously, it’s the way to go.

Continue reading