Documentation ¶
Index ¶
- type DialListener
- type PrefaceListener
- func (l *PrefaceListener) Accept() (net.Conn, error)
- func (l *PrefaceListener) DialEla(addr string, dur time.Duration) (net.Conn, error)
- func (l *PrefaceListener) DialEva(addr string, dur time.Duration) (net.Conn, error)
- func (l *PrefaceListener) RegisterHost(addr string)
- func (l *PrefaceListener) SetDeadline(deadline time.Time) error
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) RegisterHost ¶
func (l *PrefaceListener) RegisterHost(addr string)
func (*PrefaceListener) SetDeadline ¶
func (l *PrefaceListener) SetDeadline(deadline time.Time) error
Click to show internal directories.
Click to hide internal directories.