mux

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Session

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

Session wrap a smux.session, that is a multiplexed connection.

func Client

func Client(conn net.Conn) (s *Session, err error)

Client wrap a conn to create a client-side session.

func Server

func Server(conn net.Conn) (s *Session, err error)

Server wrap a conn to create a server-side session.

func (*Session) AcceptConn

func (s *Session) AcceptConn() (conn net.Conn, err error)

AcceptConn receives a new connection.

func (*Session) Close

func (s *Session) Close() error

Close this session and all established connections.

func (*Session) IsClosed

func (s *Session) IsClosed() bool

IsClosed to determine whether this session was closed.

func (*Session) NumConns

func (s *Session) NumConns() int

NumConns returns the number of established connections.

func (*Session) OpenConn

func (s *Session) OpenConn() (conn net.Conn, err error)

OpenConn creates a new connection.

func (*Session) SetDeadline

func (s *Session) SetDeadline(t time.Time) error

SetDeadline sets a deadline used by Accept* calls.

Jump to

Keyboard shortcuts

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