Sourcemod plugins those communicate with Hatser WebAPIServer, or any other Socket.io servers.
This plugin requires Socket Extension,
this makes plain TCP sockets into corresponding websockets, then converts it once again into socket.io frames.
reference here to check out how does it handshakes with Websocket server.
Some codes of websocket client are taken from peace-maker's sm-websocket which simulate a websocket server.
I revert the processes to make it work as a websocket client.
check out RFC 6455 to see how the websocket protocol works.