Versions in this module Expand all Collapse all v1 v1.6.1 May 30, 2021 Changes in this version + func NewFakeConnReader(frames []Frame) *fakeConnReader + func NewFakeConnWriter() *fakeConnWriter + func NewFakeConstReader() *fakeConstReader + type Decoder struct + func NewDecoder(r FrameReader) *Decoder + func (e *Decoder) NextReader() (frame.Type, Type, io.ReadCloser, error) + type Encoder struct + func NewEncoder(w FrameWriter) *Encoder + func (e *Encoder) NextWriter(ft frame.Type, pt Type) (io.WriteCloser, error) + type FakeDiscardWriter struct + func (w *FakeDiscardWriter) NextWriter(fType frame.Type) (io.WriteCloser, error) + type Frame struct + Data []byte + FType frame.Type + type FrameReader interface + NextReader func() (frame.Type, io.ReadCloser, error) + type FrameWriter interface + NextWriter func(typ frame.Type) (io.WriteCloser, error) + type Packet struct + Data []byte + FType frame.Type + PType Type + type Type int + const CLOSE + const MESSAGE + const NOOP + const OPEN + const PING + const PONG + const UPGRADE + func ByteToPacketType(b byte, typ frame.Type) Type + func (id Type) BinaryByte() byte + func (id Type) String() string + func (id Type) StringByte() byte