protocolmux

package
v1.0.63 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsRESPPrefix

func IsRESPPrefix(prefix byte) bool

IsRESPPrefix reports whether is resp prefix.

func NormalizeServeError

func NormalizeServeError(err error) error

NormalizeServeError normalizes a serve error.

func Serve

func Serve(ctx context.Context, listener net.Listener, httpListener *Listener, onRESPConn func(net.Conn), onHTTPConn func(net.Conn), tlsConfig *tls.Config) error

Serve handles serve.

Types

type BufferedConn

type BufferedConn struct {
	net.Conn
	// contains filtered or unexported fields
}

func (*BufferedConn) ConnectionState

func (c *BufferedConn) ConnectionState() tls.ConnectionState

ConnectionState handles a connection state.

func (*BufferedConn) Read

func (c *BufferedConn) Read(p []byte) (int, error)

Read loads read.

type Listener

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

func NewListener

func NewListener(addr net.Addr, buffer int) *Listener

NewListener creates a new listener.

func (*Listener) Accept

func (l *Listener) Accept() (net.Conn, error)

Accept manages accept.

func (*Listener) Addr

func (l *Listener) Addr() net.Addr

Addr adds a r.

func (*Listener) Close

func (l *Listener) Close() error

Close manages close.

func (*Listener) Put

func (l *Listener) Put(conn net.Conn) error

Put handles put.

Jump to

Keyboard shortcuts

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