myws

package
v0.0.0-...-c33543a Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OpcodeContinuation = 0x0
	OpcodeText         = 0x1
	OpcodeBinary       = 0x2
	// 0x3 - x07 reserved for futher non-control frames
	OpcodeClose = 0x8
	OpcodePing  = 0x9
	OpcodePong  = 0xa
)

Variables

This section is empty.

Functions

func SendWsByteFrame

func SendWsByteFrame(conn net.Conn, bf WsByteFrame) (int, error)

Types

type WsByteFrame

type WsByteFrame struct {
	Final, Rsv1, Rsv2, Rsv3 byte
	Opcode                  byte
	Masked                  byte
	PayloadInitialLen       byte
	PayloadExtendedLen      []byte
	MaskingKey              []byte
	Payload                 []byte
}

Stores bytes that are parsed from the websocket frame

func ParseWsBytes

func ParseWsBytes(conn net.Conn) (WsByteFrame, error)

func (*WsByteFrame) IsFinal

func (f *WsByteFrame) IsFinal() bool

Jump to

Keyboard shortcuts

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