Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Show HN: pocket-sockets is a small TCP/WebSockets lib written in TypeScript (github.com/bashlund)
3 points by thomasbacklund on Sept 28, 2021 | hide | past | favorite | 1 comment


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.

You all know that browsers require WebSockets but when doing server to server communication regular TCP sockets are leaner and faster.

With pocket-sockets you can switch the underlying sockets as you need but use the same interface for both TCP and WebSockets.

Small, neat and few dependencies. Written in TypeScript with a bunch of tests to it :)

It also supports SSL/TLS encryption.

Happy SYN/ACK day!




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: