websocket

package
v0.0.0-...-273cdd3 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2020 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const HandshakeTimeout = time.Second * 3

握手超时时间

View Source
const Path = "/ws"

响应路径

Variables

This section is empty.

Functions

func Acceptor

func Acceptor(limit int64, verifier Verifier) acceptor.Dialer

func Connector

func Connector() connector.Dialer

Types

type Conn

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

func (*Conn) Addr

func (conn *Conn) Addr() string

func (*Conn) Close

func (conn *Conn) Close() error

func (*Conn) Data

func (conn *Conn) Data() *sync.Map

func (*Conn) Deadline

func (conn *Conn) Deadline(time time.Time) error

func (*Conn) Read

func (conn *Conn) Read() ([]byte, error)

func (*Conn) Write

func (conn *Conn) Write(stream []byte) error

type Listener

type Listener struct {
	// contains filtered or unexported fields
}

侦听器

func (*Listener) Accept

func (listener *Listener) Accept() (session.Conn, error)

获取会话

func (*Listener) Close

func (listener *Listener) Close() error

停止服务

type Verifier

type Verifier func(*gin.Context) (*sync.Map, bool)

Jump to

Keyboard shortcuts

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