A powerful and smooth client/server sockets library for browser and Node.js, written in TypeScript with very few dependencies. WebSockets are a must w

bashlund / pocket-sockets Public

submited by
Style Pass
2021-09-28 14:30:06

A powerful and smooth client/server sockets library for browser and Node.js, written in TypeScript with very few dependencies.

WebSockets are a must when using a browser, however plain TCP sockets are faster and a good choice when no browser is involved.

The overall interface for pocket-sockets WebSocket and TCP sockets are identical so it is easy to switch between the underlying implementations.

For a quick glimpse of what it looks like to set up a server that receives a string from clients, then replies back and closes the connection afterwards, follow the example below:

Leave a Comment
Related Posts