socket

package
v0.0.0-...-0a97e14 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Enable = false

Enable control socket status is open or not

Functions

func Wshandler

func Wshandler(w http.ResponseWriter, r *http.Request)

Wshandler will upgrade http connection to websocket protocol

Types

type Notificater

type Notificater interface {
	Listen(c chan string)
	Push(msg string)
	ReadPump()
}

Notificater will start when Listen(isBlock) and Push msg to User

var Notices Notificater = new(notification)

Notices globally holds user msg that we want to send, the Push func is concurrency safe

Jump to

Keyboard shortcuts

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