Websockets with message callback

・1 min read

This is a part of a larger project that I've worked on and I figured other people might find it useful.

Project: https://github.com/aidv/websockets-callback

In my project I send data to a server using WebSockets and then waits for a response until the data has been processed.

Once a response is received a callback is executed and the user is notified.

My library simplifies such a flow a lot and code can be written like one would write any callback driven code.

DISCUSSION
Classic DEV Post from Feb 5

If/else or just if?

It's a simple question that cuts deep.

I like to make stuff

Sore eyes?

dev.to now has dark mode (in public beta).

Go to the "misc" section of your settings and select night theme ❤️