I made this nice little client/server socket lib which has the same interface both for TCP sockets and WebSockets. Free to use, MIT licensed.<p>You all know that browsers require WebSockets but when doing server to server communication regular TCP sockets are leaner and faster.<p>With pocket-sockets you can switch the underlying sockets as you need but use the same interface for both TCP and WebSockets.<p>Small, neat and few dependencies. Written in TypeScript with a bunch of tests to it :)<p>It also supports SSL/TLS encryption.<p>Happy SYN/ACK day!