websocket

package
v1.1.7 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeFrameLength

func DeFrameLength(conn gnet.Conn) (int64, error)

Types

type Conn

type Conn struct {
	gnet.Conn
	// contains filtered or unexported fields
}

func FrameConvert

func FrameConvert(conn gnet.Conn) *Conn

func (*Conn) AwaitAdd

func (self *Conn) AwaitAdd()

func (*Conn) FrameReader

func (self *Conn) FrameReader() io.Reader

func (*Conn) Free

func (self *Conn) Free()

func (*Conn) NextFrame

func (self *Conn) NextFrame() (err error)

func (*Conn) State

func (self *Conn) State() ws.State

func (*Conn) WebSocketTextWriter

func (self *Conn) WebSocketTextWriter() *TextWriter

type Handler

type Handler interface {
	Proc(ctx *eventserve.GnetContext) interface{}
}

type OnCallPostPlugin added in v1.1.7

type OnCallPostPlugin interface {
	OnCallPost(ctx *eventserve.GnetContext, x interface{}, reply interface{}) error
}

逻辑处理之后

type OnCallPrePlugin added in v1.1.7

type OnCallPrePlugin interface {
	OnCallPre(ctx *eventserve.GnetContext, x interface{}) error
}

逻辑处理之前

type OnUpgraderPlugin added in v1.1.7

type OnUpgraderPlugin interface {
	OnUpgrader(ctx *eventserve.GnetContext) error
}

ws链接建立成功之后

type TextWriter

type TextWriter struct {
	wsutil.Writer
	// contains filtered or unexported fields
}

func (*TextWriter) Flush

func (self *TextWriter) Flush() error

func (*TextWriter) Write

func (self *TextWriter) Write(p []byte) (int, error)

type WsPlugin added in v1.1.7

type WsPlugin interface{}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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