Documentation
¶
Index ¶
- Constants
- func RegisterHandlers(m *http.ServeMux)
- func StartIndividualServer(port int, reconnectTestTimer int, m *http.ServeMux, ctx context.Context) http.Server
- func StartServer(port int, enableDebug bool, reconnectTestTimer int)
- type DebugServerButtons
- type MessageMetadata
- type ReconnectMessage
- type ReconnectMessagePayload
- type ReconnectMessagePayloadSession
- type WebsocketConnection
- type WebsocketServer
- type WelcomeMessage
- type WelcomeMessagePayload
- type WelcomeMessagePayloadSession
Constants ¶
View Source
const MINIMUM_MESSAGE_FREQUENCY_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 ¶
func StartServer ¶
Types ¶
type DebugServerButtons ¶
Used for template weirdness
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 ¶
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.