HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
joewalnes
websocketd
Go2013–2024
joewalnes / websocketd

websocketd

Turn any program that uses STDIN/STDOUT into a WebSocket server. Like inetd, but for WebSockets.

15Distinct people
18Mentions
0Explicit recommenders
17.5KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Turn any program that uses STDIN/STDOUT into a WebSocket server. Like inetd, but for WebSockets.

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 1:49:46 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year18 dated mentions

Observed mentions: 2013-09-12 14:42:18 UTC to 2024-08-23 22:32:38 UTC.

0123452013-01-01 00:00:00 UTC to 2014-01-01 00:00:00 UTC (exclusive): 3 mentions; 2 submissions, 1 comments20132014-01-01 00:00:00 UTC to 2015-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20182019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 5 mentions; 2 submissions, 3 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2024

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20132013-01-01 00:00:00 UTC2014-01-01 00:00:00 UTC321
20142014-01-01 00:00:00 UTC2015-01-01 00:00:00 UTC101
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC303
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC000
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC101
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC101
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC523
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC000
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC000
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC101
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC110
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC202

What Hacker News says

18 sources
I'm pleased with this tool. I couldn't find any other simple cli tool that just reads and writes to WebSockets. Maybe just websocketd: https://github.com/joewalnes/websocketd I've used websocat for debugging web projects and remote-controlling OBS. I also have a livereload script that looks something like: mkfifo $pipe websocat --server-mode $port 0< $pipe 2> /dev/null & while sleep 1; do :; done > $pipe & and a browser userscript like: // @match localhost let ws = new WebSocket(`ws://localhost:${port}`) ws.onmessage = () => location.reload() so during development I can reload the browser when files change: find . | entr -s 'echo ping > $pipe' I've used this script for livereloading PDFs and Markdown previews, not just typical web dev. It's a bit ugly around the edges, but I like how customizable and portable it is betwe
Read the rest
en projects and browsers. I've never used websocat for advanced features, but I'm sure it's quite capable.
In WebSocat – Like Netcat for WebSockets
FZambia·Aug 15, 2023Submission

Ask HN: WebSocket server transforming channel subscriptions to gRPC streams

Hello! I'd like to ask your opinion about the idea of a WebSocket server which can handle WebSocket connections, can manage channel subscriptions and transform them to GRPC streams to a custom backend server. Let's say we have a system with 3 participants like this: Client (browser, mobile device, etc.) —> WebSocket server (the subject to implement here) —> Backend server (any custom server in any language with good GRPC support). Then the mechanics is as follows: * Client establishes WebSocket connection with WebSocket server * Client can optionally subscribe to channels. Subscriptions to channels are multiplexed over a single WebSocket connection. * Upon receiving WebSocket connection (or subscription to channel) server can open unidirectional or bidirectional stream with the configured backend which implements GRPC service. * Backend m
Read the rest
ay stream data to connections or to channel subscriptions over established GRPC streams. Data from GRPC streams will be transformed to WebSocket messages and delivered to clients with minimal latency. * Additionally, client can stream data to the backend server (if bidirectional GRPC streams are used). I.e. client sends WebSocket messages, those will be transformed to GRPC messages by WebSocket server and delivered to the application backend. As a result we have a system which allows to quickly create individual streams by using strict GRPC contract but terminating connections over WebSocket transport. So it works well in web browsers. After that no need to write WebSocket protocol, client implementation, handle WebSocket connection. This all will be solved by a suggested WebSocket server and its client SDKs. The mechanics is similar to Websocketd (https://github.com/joewalnes/websocketd), but instead of creating OS processes we create GRPC streams. The difference from grpc-web (https://github.com/grpc/grpc-web) is that we provide streaming capabilities but not exposing GRPC contract to the client - just allowing to stream any data as payload (both binary and text) with some wrappers from our client SDKs side for managing subscriptions. I.e. it's not native GRPC streams on the client side - we expose just Connection/Subscription object to stream in both directions. GRPC streams used only for communication between WebSocket server and backend. To mention - grpc-web does not support all kinds of streaming now (https://github.com/grpc/grpc-web#streaming-support) while proposed solution can. This all should provide a cross-platform way to quickly write streaming apps due to client SDKs and language-agnostic nature of GRPC. I personally see both pros and cons in this scheme (without concentrating on both too much here to keep the question short). I spent some time thinking about this myself, already have some working prototypes – but turned out need more opinions before moving forward with the idea and releasing this, kinda lost in doubts. My main question - whether this seems interesting for someone here? Do you find this useful and see practical value?
1 points · Open discussion
Websocket is actually not that complicated. A couple of headers to upgrade the request from HTTP to websocket, then framing of each payload. But you could use something like websocketd, which spawns a process of your chioce for each client and pipes the websocket to stdin and vice versa. https://github.com/joewalnes/websocketd Each PHP process looks like it takes about 5 MB of ram on my laptop, so probably not the best method for 5000+ concurrent users if you use PHP, but still.
In PHP 7 Virtual Machine
Agreed. I've been programming Go for a while, and yet I still find this site invaluable. Because I context switch between many languages, I forget syntax a lot. Hmmmm... maybe I'm just getting old. Anyway, I find it much quicker to get the answer I need by looking at GoByExample, than by browsing the Go docs. Kudos to this site. It helped me build this: https://github.com/joewalnes/websocketd/
In Go by Example

Showing the 15 most recent of 18 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.