Documentation ¶
Overview ¶
Package ppcserver is a Go multiplayer game server framework featured real-time WebSocket communication, Stateful Room, and distributed scaling via NATS. The package is under development, intending to release the first available version in 2022.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer(opts ...ServerOption) *Server
type ServerOption ¶
type ServerOption func(s *Server)
ServerOption is a function to apply various configurations to customize a Server.
func WithComponent ¶
func WithComponent(c Component) ServerOption
WithComponent is a ServerOption to register a Component to Server.components.
func WithShutdownTimeout ¶
func WithShutdownTimeout(d time.Duration) ServerOption
WithShutdownTimeout is a ServerOption to set the maximum time for each Component.Shutdown() to complete.
type ServerOptions ¶
type ServerOptions struct { // ShutdownTimeout is the maximum time for Component.Shutdown() to complete. // Defaults to 1 minute if not set via WithShutdownTimeout. ShutdownTimeout time.Duration }
ServerOptions defines the configurable opts of the Server.
Click to show internal directories.
Click to hide internal directories.