websocketencoder

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: May 19, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package websocketencoder exists to solve a problem with the default encoding in the socket.io library we're using. A PR is open [here](https://github.com/zishang520/socket.io-go-parser/pull/1) to build this functionality into the library, but in the meantime we've had to fork it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeconstructPacket

func DeconstructPacket(packet *parser.Packet) (pack *parser.Packet, buffers []types.BufferInterface)

DeconstructPacket Replaces every io.Reader | []byte in packet with a numbered placeholder.

func HasBinary

func HasBinary(data any) bool

HasBinary is a func

func IsBinary

func IsBinary(data any) bool

IsBinary Returns true if obj is a Buffer or a File.

func NewEncoder

func NewEncoder() parser.Encoder

NewEncoder is an encoder

func NewParser

func NewParser() parser.Parser

NewParser is a func

Types

type Placeholder

type Placeholder struct {
	Placeholder bool `json:"_placeholder" mapstructure:"_placeholder" msgpack:"_placeholder"`
	Num         int  `json:"num" mapstructure:"num" msgpack:"num"`
}

Placeholder

Jump to

Keyboard shortcuts

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