ws

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TWSServer

type TWSServer struct {
	MaxConnNum  int // 最大连接数
	HTTPTimeOut time.Duration

	OnRun              func(*conn.TConnection) // 自处理循环回调
	OnRead             func(*conn.TData)       // 读取回调(buf, 包长, sessionid)
	OnClientConnect    func(*conn.TConnection) // 客户端连接上来了
	OnClientDisconnect func(*conn.TConnection) // 客户端断开了
	// contains filtered or unexported fields
}

TWSServer websocket服务器类

func (*TWSServer) Close

func (self *TWSServer) Close()

Close 关闭

func (*TWSServer) Start

func (self *TWSServer) Start(strAddress string)

Start 开启

Jump to

Keyboard shortcuts

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