progutil

package
v0.0.0-...-881f455 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2020 License: Apache-2.0 Imports: 10 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DialListener

type DialListener struct {
	RemoteAddr net.Addr
	Name       string
	// contains filtered or unexported fields
}

func (*DialListener) Accept

func (lis *DialListener) Accept() (net.Conn, error)

Accept waits for and returns the next connection to the listener.

func (*DialListener) Addr

func (lis *DialListener) Addr() net.Addr

Addr returns the listener's network address.

func (*DialListener) Close

func (lis *DialListener) Close() (err error)

Close closes the listener.

type PrefaceListener

type PrefaceListener struct {
	// Listener is the underlying connection acceptor. It cannot be nil.
	net.Listener
	// contains filtered or unexported fields
}

PrefaceListener accepts connections and separates them based on whether they begin with a client HTTP/2 preface or our custom ID. It is assumed that

1. No connections are made without a preface being sent within a reasonable amount of time. 2. Accept will be called in a loop for as long as Dial will be used.

func NewPrefaceListener

func NewPrefaceListener(l net.Listener) *PrefaceListener

func (*PrefaceListener) Accept

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

func (*PrefaceListener) DialEla

func (l *PrefaceListener) DialEla(addr string, dur time.Duration) (net.Conn, error)

func (*PrefaceListener) DialEva

func (l *PrefaceListener) DialEva(addr string, dur time.Duration) (net.Conn, error)

func (*PrefaceListener) RegisterHost

func (l *PrefaceListener) RegisterHost(addr string)

func (*PrefaceListener) SetDeadline

func (l *PrefaceListener) SetDeadline(deadline time.Time) error

Jump to

Keyboard shortcuts

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