Registry / networking / libp2p-go-yamux-v3

libp2p-go-yamux-v3

JSON →
library3.1.2gogounverified

A stream multiplexer for libp2p, providing reliable, ordered, and bidirectional streams over a single TCP connection.

go get github.com/libp2p/go-yamux/v3
INSTALL
IMPORT
SIG · LIBP2P-GO-YAMUX-V3
L
libp2p-go-yamux-v3
networkinggov3.1.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

yamux
github.com/libp2p/go-yamux/v3

Creates a yamux session over a TCP connection and exchanges a message.

package main import ( "fmt" "net" "github.com/libp2p/go-yamux/v3" ) func main() { ln, _ := net.Listen("tcp", ":0") go func() { conn, _ := ln.Accept() session, _ := yamux.Server(conn, nil) stream, _ := session.Accept() fmt.Fprintln(stream, "hello") }() conn, _ := net.Dial("tcp", ln.Addr().String()) session, _ := yamux.Client(conn, nil) stream, _ := session.Open() buf := make([]byte, 1024) n, _ := stream.Read(buf) fmt.Println(string(buf[:n])) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
3.1.2latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
libp2p-go-yamux-v3 — go get libp2p-go-yamux-v3 · libregistry