Versions in this module Expand all Collapse all v2 v2.0.7 Dec 18, 2023 Changes in this version + const BinaryMessage + const CloseAbnormalClosure + const CloseGoingAway + const CloseInternalServerErr + const CloseInvalidFramePayloadData + const CloseMandatoryExtension + const CloseMessageTooBig + const CloseNoStatusReceived + const CloseNormalClosure + const ClosePolicyViolation + const CloseProtocolError + const CloseServiceRestart + const CloseTLSHandshake + const CloseTryAgainLater + const CloseUnsupportedData + const TextMessage + var ErrCloseSent = errors.New("webtransport: close sent") + var ErrReadLimit = errors.New("webtransport: read limit exceeded") + func IsCloseError(err error, codes ...int) bool + func IsUnexpectedCloseError(err error, expectedCodes ...int) bool + func IsWebTransportUpgrade(r *http.Request) bool + type BufferPool interface + Get func() interface{} + Put func(interface{}) + type CloseError struct + Code int + Text string + func (e *CloseError) Error() string + type Conn struct + func NewConn(session *webtransport.Session, stream webtransport.Stream, isServer bool, ...) *Conn + func (c *Conn) CloseWithError(code webtransport.SessionErrorCode, msg string) error + func (c *Conn) LocalAddr() net.Addr + func (c *Conn) NextReader() (messageType int, r io.Reader, err error) + func (c *Conn) NextWriter(messageType int) (io.WriteCloser, error) + func (c *Conn) ReadMessage() (messageType int, p []byte, err error) + func (c *Conn) RemoteAddr() net.Addr + func (c *Conn) Session() *webtransport.Session + func (c *Conn) SetReadDeadline(t time.Time) error + func (c *Conn) SetReadLimit(limit int64) + func (c *Conn) SetWriteDeadline(t time.Time) error + func (c *Conn) Stream() webtransport.Stream + func (c *Conn) WriteMessage(messageType int, data []byte) error + func (c *Conn) WritePreparedMessage(pm *PreparedMessage) error + type PreparedMessage struct + func NewPreparedMessage(messageType int, data []byte) (*PreparedMessage, error)