Use Socket.io in custom app

I am developing a custom app, and I need to communicate through web socket. I know that Frappe support socket.io.

My intention is to receive messages from an external software using web socket (I mean is in another server outside from frappe and erpnext).

How can I subscribe to that external software ?

I have nothing until now.