{"id":15373020,"url":"https://github.com/vi/wsbroad","last_synced_at":"2025-09-14T15:33:14.884Z","repository":{"id":57672373,"uuid":"103872629","full_name":"vi/wsbroad","owner":"vi","description":"Simple websocket broadcaster implemented in Rust","archived":false,"fork":false,"pushed_at":"2023-09-02T09:20:24.000Z","size":71,"stargazers_count":54,"open_issues_count":0,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-16T21:47:00.066Z","etag":null,"topics":["broadcast-messages","hub","rust","websocket"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-18T00:25:47.000Z","updated_at":"2025-05-03T17:45:36.000Z","dependencies_parsed_at":"2024-10-16T13:01:00.431Z","dependency_job_id":"1a6244dd-a86b-46de-8f50-667824991b73","html_url":"https://github.com/vi/wsbroad","commit_stats":{"total_commits":41,"total_committers":1,"mean_commits":41.0,"dds":0.0,"last_synced_commit":"8e2db2b260df99b2a6df2b5dbf88ecf0266034b5"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/vi/wsbroad","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vi%2Fwsbroad","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vi%2Fwsbroad/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vi%2Fwsbroad/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vi%2Fwsbroad/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vi","download_url":"https://codeload.github.com/vi/wsbroad/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vi%2Fwsbroad/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260458702,"owners_count":23012499,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["broadcast-messages","hub","rust","websocket"],"created_at":"2024-10-01T13:54:07.062Z","updated_at":"2025-06-22T17:33:34.030Z","avatar_url":"https://github.com/vi.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wsbroad\n\nWebsocket broadcaster implemented in Rust.\n\nEach WebSocket message sent to a particular URL on this websocket server gets delivered to all other WebSocket clients connected to the same URL. By default allows up to 64 URLs. If client is reading incoming messages too slowly, they are getting dropped for this client; no backpressure and no accumulation of messages in memory (unless you override this with `--backpressure` or other CLI flags).\n\nIf you want to base your own project on wsbroad, you may want to use simpler [version 0.2](https://github.com/vi/wsbroad/tree/v0.2.2) without additional features.\n\n```\n$ wsbroad 127.0.0.1:9002\n+ 127.0.0.1:57208 -\u003e /baz\nNew URL: /123\n+ 127.0.0.1:57209 -\u003e /baz\n+ 127.0.0.1:57211 -\u003e /baz\n- 127.0.0.1:57208 -\u003e /baz\n- 127.0.0.1:57211 -\u003e /baz\n- 127.0.0.1:57209 -\u003e /baz\nExpiring URL: /baz\n```\n\nFor `wss://` server use some Nginx forwarding.\n\nSee [Github releases](https://github.com/vi/wsbroad/releases/) for pre-built versions.\n\n# Usage message\n\u003cdetails\u003e\u003csummary\u003e wsbroad --help output\u003c/summary\u003e\n\n```\nwsbroad\n\nARGS:\n    \u003clisten_addr\u003e\n      TCP or other socket socket address to bind and listen for incoming WebSocket connections\n\n      Specify `sd-listen` for socket-activated mode, file path for UNIX socket (start abstrat addresses with @).\n\nOPTIONS:\n    --unix-listen-unlink\n      remove UNIX socket prior to binding to it\n\n    --unix-listen-chmod \u003cmode\u003e\n      change filesystem mode of the newly bound UNIX socket to `owner` (006), `group` (066) or `everybody` (666)\n\n    --unix-listen-uid \u003cuid\u003e\n      change owner user of the newly bound UNIX socket to this numeric uid\n\n    --unix-listen-gid \u003cuid\u003e\n      change owner group of the newly bound UNIX socket to this numeric uid\n\n    --sd-accept-ignore-environment\n      ignore environment variables like LISTEN_PID or LISTEN_FDS and unconditionally use file descritor `3` as a socket in\n      sd-listen or sd-listen-unix modes\n\n    --tcp-keepalive \u003cka_triplet\u003e\n\n    --tcp-reuse-port\n      try to set SO_REUSEPORT, so that multiple processes can accept connections from the same port in a round-robin fashion.\n\n      Obviously, URL domains would be different based on which instance does the client land.\n\n    --tcp-only-v6\n      set socket's IPV6_V6ONLY to true, to avoid receiving IPv4 connections on IPv6 socket\n\n    --tcp-listen-backlog \u003cbl\u003e\n      Maximum number of pending unaccepted connections\n\n    --recv-buffer-size \u003csz\u003e\n      Set size of socket receive buffer size\n\n    --send-buffer-size \u003csz\u003e\n      Set size of socket send buffer size in operating system.\n      Together with --max-write-buffer-size, it may affect latency when\n      messages need to be dropped on overload\n\n    --write-buffer-size \u003csize_bytes\u003e\n      The target minimum size of the in-app write buffer to reach before writing the data to the underlying stream.\n      The default value is 128 KiB, but wsbroad flushes after sending every message, so this may be unrelevant.\n\n      May be 0. Needs to be less that --max-write-buffer-size.\n\n    --max-write-buffer-size \u003csize_bytes\u003e\n      The max size of the in-app write buffer in bytes. Default is 4 MiB.\n\n      This affects how much messages get buffered before droppign\n      or slowing down sender begins. Note that --send-buffer-size also affects\n      this behaviour.\n\n      Also indirectly affects max message size\n\n    --max-message-size \u003csize_bytes\u003e\n      The maximum size of a message. Default is 1 MiB.\n\n    --max-frame-size \u003csize_bytes\u003e\n      The maximum size of a single message frame. Default is 1 MiB.\n\n    --accept-unmasked-frames\n\n    --max-urls \u003cnum\u003e\n      Maximum number of URLs to handle before rejecting the new ones\n\n    --reflexive\n      Also send messages back to the sender\n\n    --backpressure\n      Slow down senders if there are active receives that are\n      unable to take all the messages fast enough.\n      Makes messages reliable.\n\n    --backpressure-with-errors\n      Similar to --backpressure, but also disconnect senders to an URL if\n      we detected that some receiver is abruptly gone.\n\n      Abruptly means we detected an error when trying to send some data to the\n      client's socket, not to receive from it.\n\n    --nodelay\n      Set TCP_NODELAY to deliver small messages with less latency\n\n    --stochastic-queue \u003cqlen\u003e\n      drop messages to slow receivers not in clusters (i.e. multiple dropped messages in a row),\n      but with increasing probability based on congestion level.\n      Value is maximum additional queue length. The bigger - the more uniformly message going to be\n      dropped when overloaded, but the higher there may be latency for message that go though\n\n      Short queue descreases thgouhput.\n\n      Note that other buffers (--max-write-buffer-size and --send-buffer-size) still apply after this queue.\n\n      Unlike other options, the unit is messages, not bytes\n\n    -h, --help\n      Prints help information.\n```\n\u003c/details\u003e\n\n# See also\n\n* https://github.com/vi/postsse for similar application, but for HTTP POST and HTTP GET (SSE) instead of WebSockets.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvi%2Fwsbroad","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvi%2Fwsbroad","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvi%2Fwsbroad/lists"}