websocket2

package
v0.0.0-...-1f3ab30 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Manager = &ClientManager{
	broadcast:  make(chan []byte, 100),
	onetoone:   make(chan []byte, 100),
	register:   make(chan *Client),
	unregister: make(chan *Client),
	clients:    make(map[string]*Client),
}

Functions

func Echo

func Echo(res http.ResponseWriter, req *http.Request)

func Exit

func Exit(res http.ResponseWriter, req *http.Request)

Types

type Client

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

type ClientManager

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

func (*ClientManager) GetMQData

func (manager *ClientManager) GetMQData(client *lib.MQ)

func (*ClientManager) Start

func (manager *ClientManager) Start()

type Message

type Message struct {
	Sender    string `json:"sender,omitempty"`
	Recipient string `json:"recipient,omitempty"`
	Content   string `json:"content,omitempty"`
}

Jump to

Keyboard shortcuts

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