Documentation
¶
Index ¶
- Constants
- func RegisterHandlers(m *http.ServeMux)
- func StartIndividualServer(port int, sslEnabled bool, m *http.ServeMux, ctx context.Context, ...) http.Server
- func StartServer(port int, enableDebug bool, reconnectTestTimer int, sslEnabled bool)
- type DebugServerButtons
- type KeepaliveMessage
- type KeepaliveMessagePayload
- type MessageMetadata
- type ReconnectMessage
- type ReconnectMessagePayload
- type ReconnectMessagePayloadSession
- type WebsocketConnection
- type WebsocketServer
- type WelcomeMessage
- type WelcomeMessagePayload
- type WelcomeMessagePayloadSession
Constants ¶
View Source
const KEEPALIVE_TIMEOUT_SECONDS = 10
Minimum time between messages before the server disconnects a client. AKA, "timeout period" * This is a const for now, but it may need to be a flag in the future.
Variables ¶
This section is empty.
Functions ¶
func RegisterHandlers ¶
func StartIndividualServer ¶
Types ¶
type DebugServerButtons ¶
Used for template weirdness
type KeepaliveMessage ¶ added in v1.1.10
type KeepaliveMessage struct {
Metadata MessageMetadata `json:"metadata"`
Payload KeepaliveMessagePayload `json:"payload"`
}
type KeepaliveMessagePayload ¶ added in v1.1.10
type KeepaliveMessagePayload struct{}
type MessageMetadata ¶
type ReconnectMessage ¶
type ReconnectMessage struct {
Metadata MessageMetadata `json:"metadata"`
Payload ReconnectMessagePayload `json:"payload"`
}
type ReconnectMessagePayload ¶
type ReconnectMessagePayload struct {
Session ReconnectMessagePayloadSession `json:"session"`
}
type WebsocketConnection ¶
func (*WebsocketConnection) SendMessage ¶ added in v1.1.10
func (wc *WebsocketConnection) SendMessage(messageType int, data []byte) error
type WebsocketServer ¶
type WebsocketServer struct {
// contains filtered or unexported fields
}
type WelcomeMessage ¶
type WelcomeMessage struct {
Metadata MessageMetadata `json:"metadata"`
Payload WelcomeMessagePayload `json:"payload"`
}
type WelcomeMessagePayload ¶
type WelcomeMessagePayload struct {
Session WelcomeMessagePayloadSession `json:"session"`
}
Click to show internal directories.
Click to hide internal directories.