http

package
v1.0.122 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InitStream   = StreamId(0)
	ClientServer = StreamId(1)
	ServerClient = StreamId(3)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpConnection

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

HttpConnection is a wrapper around a http2.Framer that provides a simple interface to read and write http2 streams for iOS17+.

func NewHttpConnection

func NewHttpConnection(rw io.ReadWriteCloser) (*HttpConnection, error)

func (*HttpConnection) Close

func (r *HttpConnection) Close() error

func (*HttpConnection) ReadClientServerStream

func (r *HttpConnection) ReadClientServerStream(p []byte) (int, error)

func (*HttpConnection) ReadServerClientStream

func (r *HttpConnection) ReadServerClientStream(p []byte) (int, error)

func (*HttpConnection) Write

func (r *HttpConnection) Write(p []byte, streamId uint32) (int, error)

func (*HttpConnection) WriteClientServerStream

func (r *HttpConnection) WriteClientServerStream(p []byte) (int, error)

func (*HttpConnection) WriteServerClientStream

func (r *HttpConnection) WriteServerClientStream(p []byte) (int, error)

type HttpStreamReadWriter

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

func NewStreamReadWriter

func NewStreamReadWriter(h *HttpConnection, streamId StreamId) HttpStreamReadWriter

func (HttpStreamReadWriter) Read

func (h HttpStreamReadWriter) Read(p []byte) (n int, err error)

func (HttpStreamReadWriter) Write

func (h HttpStreamReadWriter) Write(p []byte) (n int, err error)

type StreamId

type StreamId uint32

Jump to

Keyboard shortcuts

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