packet

package
v0.0.0-...-4ea3bf1 Latest Latest
Warning

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

Go to latest
Published: May 13, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OpenPacket

type OpenPacket struct {
	SID          string   `json:"sid"`
	Upgrades     []string `json:"upgrades"`
	PingInterval int64    `json:"pingInterval"`
	PingTimeout  int64    `json:"pingTimeout"`
}

type Packet

type Packet struct {
	PacketType PacketType
	IsBinary   bool
}

func GetPacketFromByte

func GetPacketFromByte(b byte, isBase64 bool) (*Packet, error)

func (Packet) String

func (p Packet) String() string

func (Packet) ToByte

func (p Packet) ToByte(supportsBinary bool) []byte

type PacketType

type PacketType int
const (
	Open    PacketType = 0 //done
	Close   PacketType = 1 //??? (xhr only?)
	Ping    PacketType = 2 // done
	Pong    PacketType = 3 // done
	Message PacketType = 4 // started, low level right now.
	Upgrade PacketType = 5 //!!! (polling->websocket)
	Noop    PacketType = 6 //!!! (for xhr)
)

Jump to

Keyboard shortcuts

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