package
Version:
v0.0.0-...-e91929a
Opens a new window with list of versions in this module.
Published: Oct 26, 2017
License: MIT
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
func ServeCounts(getter func() int, setter func(int))
ServeCounts increment/decrement websocket client count, increment pushed count, increment socket ID
SetOrigin set websocket origin "/scheme://host(:port)/" or "" (will not check)
WsHandler serve websocket
type Message struct {
Message string `json:"message"`
Count int `json:"count"`
Clients int `json:"clients"`
}
Message is format to send information
Server send Message and client send "ping"
Source Files
¶
Click to show internal directories.
Click to hide internal directories.