socket

package
v0.0.0-...-4bb85b7 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ws

func Ws(c *gin.Context)

Types

type Message

type Message struct {
	UsId    int64       `json:"usid"`
	DsId    int64       `json:"dsid"`
	Type    string      `json:"type"`
	Content interface{} `json:"content"`
}

type Node

type Node struct {
	Conn *websocket.Conn
	//并行转串行,
	DataQueue chan []byte
}

本核心在于形成userid和Node的映射关系

Jump to

Keyboard shortcuts

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