gosora/no_websockets.go
Azareal ce9195c841 Revamped Tempra Conflux.
Updated the readme.
Added more comments.
The forumView cache for MemoryForumStore now excludes Social Groups.
Moved the word filter logic into it's own file.
You can now change the language via the configuration file.
Moved the inline CSS into the CSS files.
2017-09-13 16:09:13 +01:00

43 lines
906 B
Go

// +build no_ws
package main
import "errors"
import "net/http"
// TODO: Disable WebSockets on high load? Add a Control Panel interface for disabling it?
var enableWebsockets = false // Put this in caps for consistency with the other constants?
var wsHub WSHub
var errWsNouser = errors.New("This user isn't connected via WebSockets")
type WSHub struct {
}
func (_ *WSHub) guestCount() int {
return 0
}
func (_ *WSHub) userCount() int {
return 0
}
func (hub *WSHub) broadcastMessage(_ string) error {
return nil
}
func (hub *WSHub) pushMessage(_ int, _ string) error {
return errWsNouser
}
func (hub *WSHub) pushAlert(_ int, _ int, _ string, _ string, _ int, _ int, _ int) error {
return errWsNouser
}
func (hub *WSHub) pushAlerts(_ []int, _ int, _ string, _ string, _ int, _ int, _ int) error {
return errWsNouser
}
func routeWebsockets(_ http.ResponseWriter, _ *http.Request, _ User) {
}