Documentation ¶
Overview ¶
Package webobs provides creation of websocket handlers at runtime, allowing easy communication between go program and web browsers
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct { // WriteCh is used whenever the application wish to send messages // the web observers (websocket connected browsers) WriteCh chan Message // contains filtered or unexported fields }
func StartServer ¶
StartServer creates and starts a http server with no handles, it awaits for channels to be set.
func (*Server) HasRegisteredClient ¶
HasRegisteredClient returns whether there is a client for given tag
func (*Server) SetChannel ¶
SetChannel adds a websocket handle and http handle to serve rendered html pages and scripts
func (*Server) ShutClientsForTag ¶
Shut all clients connected to a specific tag
Click to show internal directories.
Click to hide internal directories.