Categorygithub.com/libp2p/go-mplex
modulepackage
0.7.0
Repository: https://github.com/libp2p/go-mplex.git
Documentation: pkg.go.dev

# README

go-mplex

Go Reference Discourse posts

A super simple stream muxing library implementing mplex.

Usage

mplex := multiplex.NewMultiplex(mysocket)

s, _ := mplex.NewStream()
s.Write([]byte("Hello World!"))
s.Close()

os, _ := mplex.Accept()
// echo back everything received
io.Copy(os, os)

The last gx published version of this module was: 0.2.35: QmWGQQ6Tz8AdUpxktLf3zgnVN9Vy8fcWVezZJSU3ZmiANj

# Packages

No description provided by the author

# Functions

NewMultiplex creates a new multiplexer session.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

No description provided by the author
ErrInvalidState is returned when the other side does something it shouldn't.
ErrShutdown is returned when operating on a shutdown session.
No description provided by the author
No description provided by the author
ErrTwoInitiators is returned when both sides think they're the initiator.
Max time to block waiting for a slow reader to read from a stream before resetting it.
No description provided by the author

# Structs

Multiplex is a mplex session.
No description provided by the author

# Interfaces

The MemoryManager allows management of memory allocations.