multiplexer

package
v0.0.0-...-f3d5c14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 24, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Multiplexer

type Multiplexer interface {
	AcceptStream() (net.Conn, error)
	OpenStream() (net.Conn, error)
}

Multiplexer is the multiplexer interface

func NewMultiplexer

func NewMultiplexer(protocol string, conn net.Conn, isClient bool) (Multiplexer, error)

NewMultiplexer creates a multiplexer based on conf

func NewSmux

func NewSmux(conn net.Conn, isClient bool) (Multiplexer, error)

NewSmux creates a new smux multiplexer

func NewYamux

func NewYamux(conn net.Conn, isClient bool) (Multiplexer, error)

NewYamux creates a new yamux multiplexer

type Smux

type Smux struct {
	// contains filtered or unexported fields
}

Smux is the multiplexer using smux

func (*Smux) AcceptStream

func (s *Smux) AcceptStream() (net.Conn, error)

AcceptStream is used to block until the next available stream is ready to be accepted

func (*Smux) OpenStream

func (s *Smux) OpenStream() (net.Conn, error)

OpenStream is used to create a new stream

type Yamux

type Yamux struct {
	// contains filtered or unexported fields
}

Yamux is the multiplexer using yamux

func (*Yamux) AcceptStream

func (s *Yamux) AcceptStream() (net.Conn, error)

AcceptStream is used to block until the next available stream is ready to be accepted

func (*Yamux) OpenStream

func (s *Yamux) OpenStream() (net.Conn, error)

OpenStream is used to create a new stream

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL