driver

package
v0.0.0-...-d8cc314 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2023 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WSConn

type WSConn struct {
	Server *WSServer
	// contains filtered or unexported fields
}

func (*WSConn) CallApi

func (ws *WSConn) CallApi(req zero.APIRequest) (zero.APIResponse, error)

CallApi 发送ws请求

type WSServer

type WSServer struct {
	//Port        int // ws连接地址
	//AccessToken string
	Server websocket.Upgrader
	// contains filtered or unexported fields
}

func NewWebSocketServer

func NewWebSocketServer() *WSServer

func (*WSServer) Connect

func (ws *WSServer) Connect()

func (*WSServer) Listen

func (ws *WSServer) Listen(handler func([]byte, zero.APICaller))

func (*WSServer) SelfID

func (ws *WSServer) SelfID() int64

Jump to

Keyboard shortcuts

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