Versions in this module Expand all Collapse all v0 v0.0.1 Mar 20, 2025 Changes in this version + const AckPacket + const BinaryAckPacket + const BinaryEventPacket + const ConnectErrorPacket + const ConnectPacket + const DisconnectPacket + const ErrBinaryDataUnsupported + const ErrDecodeBase64Failed + const ErrDecodeFieldFailed + const ErrEmptyDataArray + const ErrEncodeFieldFailed + const ErrMarshalBinaryDataFailed + const ErrMarshalDataFailed + const ErrParseIntFailed + const ErrReadFailed + const ErrReadUseBuffer + const ErrShortRead + const ErrShortWrite + const ErrUnexpectedAttachmentEnd + const ErrUnexpectedJSONEnd + const ErrUnexpectedPacketType + const ErrUnmarshalBinaryDataFailed + const ErrUnmarshalDataFailed + const ErrUnmarshalInitialFieldFailed + const ErrorPacket + const EventPacket + type NewPacket func() Packet + type Option func(Packet) + func WithAckID(ackID uint64) Option + func WithNamespace(namespace string) Option + func WithType(_type byte) Option + type Packet interface + WithAckID func(uint64) Packet + WithData func(interface{}) Packet + WithNamespace func(string) Packet + WithOption func(...Option) Packet + WithType func(byte) Packet + func NewPacketV1() Packet + func NewPacketV2() Packet + func NewPacketV3() Packet + func NewPacketV4() Packet + func NewPacketV5() Packet + type PacketError struct + func (e PacketError) Error() string + func (e PacketError) Is(target error) bool + type PacketV1 struct + func (pac *PacketV1) Copy(w io.Writer, r io.Reader) (n int64, err error) + func (pac *PacketV1) GetAckID() uint64 + func (pac *PacketV1) GetData() interface{} + func (pac *PacketV1) GetNamespace() string + func (pac *PacketV1) GetType() byte + func (pac *PacketV1) Read(p []byte) (n int, err error) + func (pac *PacketV1) ReadFrom(r io.Reader) (n int64, err error) + func (pac *PacketV1) WithAckID(x uint64) Packet + func (pac *PacketV1) WithData(x interface{}) Packet + func (pac *PacketV1) WithNamespace(x string) Packet + func (pac *PacketV1) WithOption(opts ...Option) Packet + func (pac *PacketV1) WithType(x byte) Packet + func (pac *PacketV1) Write(p []byte) (n int, err error) + func (pac *PacketV1) WriteTo(w io.Writer) (n int64, err error) + func (pac PacketV1) Len() (n int) + type PacketV2 struct + func (pac *PacketV2) Copy(w io.Writer, r io.Reader) (n int64, err error) + func (pac *PacketV2) GetAckID() uint64 + func (pac *PacketV2) GetData() interface{} + func (pac *PacketV2) GetNamespace() string + func (pac *PacketV2) GetType() byte + func (pac *PacketV2) Read(p []byte) (n int, err error) + func (pac *PacketV2) ReadFrom(r io.Reader) (n int64, err error) + func (pac *PacketV2) WithAckID(x uint64) Packet + func (pac *PacketV2) WithData(x interface{}) Packet + func (pac *PacketV2) WithNamespace(x string) Packet + func (pac *PacketV2) WithOption(opts ...Option) Packet + func (pac *PacketV2) WithType(x byte) Packet + func (pac *PacketV2) Write(p []byte) (n int, err error) + func (pac *PacketV2) WriteTo(w io.Writer) (n int64, err error) + func (pac PacketV2) Len() (n int) + type PacketV3 struct + func (pac *PacketV3) Copy(w io.Writer, r io.Reader) (n int64, err error) + func (pac *PacketV3) GetAckID() uint64 + func (pac *PacketV3) GetData() interface{} + func (pac *PacketV3) GetNamespace() string + func (pac *PacketV3) GetType() byte + func (pac *PacketV3) Read(p []byte) (n int, err error) + func (pac *PacketV3) ReadFrom(r io.Reader) (n int64, err error) + func (pac *PacketV3) WithAckID(x uint64) Packet + func (pac *PacketV3) WithData(x interface{}) Packet + func (pac *PacketV3) WithNamespace(x string) Packet + func (pac *PacketV3) WithOption(opts ...Option) Packet + func (pac *PacketV3) WithType(x byte) Packet + func (pac *PacketV3) Write(p []byte) (n int, err error) + func (pac *PacketV3) WriteTo(w io.Writer) (n int64, err error) + func (pac PacketV3) Len() (n int) + type PacketV4 struct + func (pac *PacketV4) Copy(w io.Writer, r io.Reader) (n int64, err error) + func (pac *PacketV4) GetAckID() uint64 + func (pac *PacketV4) GetData() interface{} + func (pac *PacketV4) GetNamespace() string + func (pac *PacketV4) GetType() byte + func (pac *PacketV4) Read(p []byte) (n int, err error) + func (pac *PacketV4) ReadBinary() (bin func(r io.Reader) error) + func (pac *PacketV4) ReadFrom(r io.Reader) (n int64, err error) + func (pac *PacketV4) WithAckID(x uint64) Packet + func (pac *PacketV4) WithData(x interface{}) Packet + func (pac *PacketV4) WithNamespace(x string) Packet + func (pac *PacketV4) WithOption(opts ...Option) Packet + func (pac *PacketV4) WithType(x byte) Packet + func (pac *PacketV4) Write(p []byte) (n int, err error) + func (pac *PacketV4) WriteTo(w io.Writer) (n int64, err error) + func (pac PacketV4) Len() (n int) + type PacketV5 struct + func (pac *PacketV5) Copy(w io.Writer, r io.Reader) (n int64, err error) + func (pac *PacketV5) GetAckID() uint64 + func (pac *PacketV5) GetData() interface{} + func (pac *PacketV5) GetNamespace() string + func (pac *PacketV5) GetType() byte + func (pac *PacketV5) Read(p []byte) (n int, err error) + func (pac *PacketV5) ReadBinary() (bin func(r io.Reader) error) + func (pac *PacketV5) ReadFrom(r io.Reader) (n int64, err error) + func (pac *PacketV5) WithAckID(x uint64) Packet + func (pac *PacketV5) WithData(x interface{}) Packet + func (pac *PacketV5) WithNamespace(x string) Packet + func (pac *PacketV5) WithOption(opts ...Option) Packet + func (pac *PacketV5) WithType(x byte) Packet + func (pac *PacketV5) Write(p []byte) (n int, err error) + func (pac *PacketV5) WriteTo(w io.Writer) (n int64, err error) + func (pac PacketV5) Len() (n int)