websocket

package
v0.0.0-...-ece4ffb Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2019 License: Apache-2.0, Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddClientNum

func AddClientNum()

func InitMoniter

func InitMoniter()

func NowSec

func NowSec() int

func ParseGzip

func ParseGzip(data []byte, handleErr bool) ([]byte, error)

func SubClientNum

func SubClientNum()

func WSRun

func WSRun()

func WSRunWithIP

func WSRunWithIP(ip string)

func WSWithOrder

func WSWithOrder()

Types

type Client

type Client struct {
	Name string
	Addr string
	Ws   *websocket.Conn
}

func NewClient

func NewClient(addr string, name string) *Client

func (*Client) RunClient

func (cli *Client) RunClient()

type Message

type Message struct {
	Ts      int    `json:"ts"`
	Status  string `json:"status"`
	ErrCode string `json:"err-code"`
	ErrMsg  string `json:"err-msg"`
	Ping    int    `json:"ping"`
}

type Moniter

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

Jump to

Keyboard shortcuts

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