Documentation ¶
Overview ¶
Package h2conn implements a net.Conn reads and writes over which are actually directed towards a h/2 stream.
Index ¶
- type T
- func (c *T) Close() error
- func (c *T) LocalAddr() net.Addr
- func (c *T) Read(p []byte) (int, error)
- func (c *T) RemoteAddr() net.Addr
- func (c *T) SetDeadline(t time.Time) error
- func (c *T) SetReadDeadline(t time.Time) error
- func (c *T) SetWriteDeadline(t time.Time) error
- func (c *T) Write(p []byte) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type T ¶
type T struct { net.Conn io.ReadCloser io.WriteCloser // contains filtered or unexported fields }
T is the type of h/2 overlay connections.
func New ¶
New creates a new T given a http.Roundtripper and a remote URL string to connect to via h/2 as well as any headers that are needed.
func (*T) Read ¶
Read makes the initial request if needed, after which it reads from the response body if no error was encountered.
func (*T) RemoteAddr ¶ added in v0.3.1
Click to show internal directories.
Click to hide internal directories.