{"id":20388295,"url":"https://github.com/libp2p/go-yamux","last_synced_at":"2025-04-11T23:18:39.870Z","repository":{"id":38822348,"uuid":"187940333","full_name":"libp2p/go-yamux","owner":"libp2p","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-29T08:32:28.000Z","size":457,"stargazers_count":32,"open_issues_count":10,"forks_count":24,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-04-11T23:18:27.789Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/libp2p.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":"2019-05-22T01:32:51.000Z","updated_at":"2025-03-28T13:06:48.000Z","dependencies_parsed_at":"2024-06-18T15:17:51.839Z","dependency_job_id":"2865c924-0a6e-4350-8a06-987cfc56f766","html_url":"https://github.com/libp2p/go-yamux","commit_stats":{"total_commits":258,"total_committers":30,"mean_commits":8.6,"dds":0.7015503875968992,"last_synced_commit":"53ef5820bd48aaacef08d6c9218b27dbb1cd6e9f"},"previous_names":[],"tags_count":41,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libp2p%2Fgo-yamux","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libp2p%2Fgo-yamux/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libp2p%2Fgo-yamux/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libp2p%2Fgo-yamux/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/libp2p","download_url":"https://codeload.github.com/libp2p/go-yamux/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248492885,"owners_count":21113163,"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":[],"created_at":"2024-11-15T03:08:37.388Z","updated_at":"2025-04-11T23:18:39.850Z","avatar_url":"https://github.com/libp2p.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Yamux\n\nYamux (Yet another Multiplexer) is a multiplexing library for Golang.\nIt relies on an underlying connection to provide reliability\nand ordering, such as TCP or Unix domain sockets, and provides\nstream-oriented multiplexing. It is inspired by SPDY but is not\ninteroperable with it.\n\nYamux features include:\n\n* Bi-directional streams\n  * Streams can be opened by either client or server\n  * Server-side push support\n* Flow control\n  * Avoid starvation\n  * Back-pressure to prevent overwhelming a receiver\n* Keep Alives\n  * Enables persistent connections over a load balancer\n* Efficient\n  * Enables thousands of logical streams with low overhead\n\n## Documentation\n\nFor complete documentation, see the associated [Godoc](http://godoc.org/github.com/libp2p/go-yamux).\n\n## Specification\n\nThe full specification for Yamux is provided in the `spec.md` file.\nIt can be used as a guide to implementors of interoperable libraries.\n\n## Usage\n\nUsing Yamux is remarkably simple:\n\n```go\n\nfunc client() {\n    // Get a TCP connection\n    conn, err := net.Dial(...)\n    if err != nil {\n        panic(err)\n    }\n\n    // Setup client side of yamux\n    session, err := yamux.Client(conn, nil)\n    if err != nil {\n        panic(err)\n    }\n\n    // Open a new stream\n    stream, err := session.Open()\n    if err != nil {\n        panic(err)\n    }\n\n    // Stream implements net.Conn\n    stream.Write([]byte(\"ping\"))\n}\n\nfunc server() {\n    // Accept a TCP connection\n    conn, err := listener.Accept()\n    if err != nil {\n        panic(err)\n    }\n\n    // Setup server side of yamux\n    session, err := yamux.Server(conn, nil)\n    if err != nil {\n        panic(err)\n    }\n\n    // Accept a stream\n    stream, err := session.Accept()\n    if err != nil {\n        panic(err)\n    }\n\n    // Listen for a message\n    buf := make([]byte, 4)\n    stream.Read(buf)\n}\n\n```\n\n---\nThe last gx published version of this module was: 1.1.5: QmUNMbRUsVYHi1D14annF7Rr7pQAX7TNLwpRCa975ojKnw\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibp2p%2Fgo-yamux","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flibp2p%2Fgo-yamux","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibp2p%2Fgo-yamux/lists"}