{"id":19606648,"url":"https://github.com/gothack/tokio-stream-multiplexor","last_synced_at":"2025-04-27T19:33:03.229Z","repository":{"id":57670116,"uuid":"430401176","full_name":"GothAck/tokio-stream-multiplexor","owner":"GothAck","description":"Shovel multiple inner streams down the same outer pipe","archived":false,"fork":false,"pushed_at":"2022-12-27T02:30:19.000Z","size":92,"stargazers_count":4,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-23T03:44:05.646Z","etag":null,"topics":["multiplexing","rust","tokio"],"latest_commit_sha":null,"homepage":"","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/GothAck.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}},"created_at":"2021-11-21T15:14:19.000Z","updated_at":"2025-02-23T09:30:19.000Z","dependencies_parsed_at":"2023-01-31T02:30:58.510Z","dependency_job_id":null,"html_url":"https://github.com/GothAck/tokio-stream-multiplexor","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GothAck%2Ftokio-stream-multiplexor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GothAck%2Ftokio-stream-multiplexor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GothAck%2Ftokio-stream-multiplexor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GothAck%2Ftokio-stream-multiplexor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GothAck","download_url":"https://codeload.github.com/GothAck/tokio-stream-multiplexor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251196410,"owners_count":21550948,"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":["multiplexing","rust","tokio"],"created_at":"2024-11-11T10:06:26.660Z","updated_at":"2025-04-27T19:33:02.978Z","avatar_url":"https://github.com/GothAck.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://app.travis-ci.com/GothAck/tokio-stream-multiplexor.svg?branch=master)](https://app.travis-ci.com/GothAck/tokio-stream-multiplexor)\n[![Rust](https://github.com/GothAck/tokio-stream-multiplexor/actions/workflows/rust.yml/badge.svg)](https://github.com/GothAck/tokio-stream-multiplexor/actions/workflows/rust.yml)\n![Crates.io](https://img.shields.io/crates/v/tokio-stream-multiplexor)\n![Crates.io](https://img.shields.io/crates/l/tokio-stream-multiplexor)\n![docs.rs](https://img.shields.io/docsrs/tokio-stream-multiplexor)\n\n\u003c!-- cargo-sync-readme start --\u003e\n\n# Tokio Stream Multiplexor\n\nTL;DR: Multiplex multiple streams over a single stream. Has a TcpListener / TcpSocket style interface, and uses u16 ports similar to TCP itself.\n\n```toml\n[dependencies]\nfoo = \"1.2.3\"\n```\n\n## Why?\n\nBecause sometimes you wanna cram as much shite down one TCP stream as you possibly can, rather than have your application connect with multiple ports.\n\n## But Whyyyyyy?\n\nBecause I needed it. Inspired by [async-smux](https://github.com/black-binary/async-smux), written for [Tokio](https://tokio.rs/).\n\n## What about performance?\nDoesn't this whole protocol in a protocol thing hurt perf?\n\nSure, but take a look at the benches:\n\n```rust\nthroughput/tcp          time:   [28.968 ms 30.460 ms 31.744 ms]\n                        thrpt:  [7.8755 GiB/s 8.2076 GiB/s 8.6303 GiB/s]\n\nthroughput/mux          time:   [122.24 ms 135.96 ms 158.80 ms]\n                        thrpt:  [1.5743 GiB/s 1.8388 GiB/s 2.0451 GiB/s]\n```\n\nApproximately 4.5 times slower than TCP, but still able to shovel 1.8 GiB/s of shite... Seems alright to me. (Numbers could possibly be improved with some tuning of the config params too.)\n\n\u003c!-- cargo-sync-readme end --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgothack%2Ftokio-stream-multiplexor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgothack%2Ftokio-stream-multiplexor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgothack%2Ftokio-stream-multiplexor/lists"}