ws

package
v0.0.0-...-b015d54 Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(rg *gin.RouterGroup, handlers ...gin.HandlerFunc)

func NewMelody

func NewMelody(pingPeriod time.Duration) (melo *melody.Melody)

Types

type Client

type Client struct {
	Id          string    `json:"id"`
	Address     string    `json:"address"`
	Name        string    `json:"name"`
	ConnectTime time.Time `json:"connectTime"`
	PongTime    time.Time `json:"pongTime"`

	*sync.RWMutex `json:"-"`
	// contains filtered or unexported fields
}

func NewClient

func NewClient(addr, name string, melo *melody.Melody) *Client

func (*Client) HandleMsg

func (client *Client) HandleMsg(msg []byte) (data []byte, err error)

func (Client) String

func (client Client) String() string

Jump to

Keyboard shortcuts

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