Documentation ¶
Index ¶
- func AttachResource(mux *http.ServeMux, path string, resource resourcepack.Resource) error
- func AttachResources(mux *http.ServeMux, path string, resources []string) error
- func CreateMux(api ServerAPI) (*http.ServeMux, error)
- func ExactMatchChecker(path string, handler http.Handler) http.Handler
- func LaunchHTTP(api ServerAPI) error
- func StaticHandler(modTime time.Time, nameForType string, data []byte) http.Handler
- type Command
- type ErrorStop
- type ServerAPI
- type ServerSession
- type WebSocketClient
- type WebSocketServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AttachResource ¶
func AttachResources ¶
func LaunchHTTP ¶
Types ¶
type ServerAPI ¶
type ServerAPI interface { Connect() ServerSession ResourcePack() *resourcepack.ResourcePack }
type ServerSession ¶
type ServerSession interface { Close() OnMessage(Command) // send nil to the view send callback to close connection BeginSend(func(update *sprite.ViewUpdate) error) }
type WebSocketClient ¶
type WebSocketClient struct {
// contains filtered or unexported fields
}
type WebSocketServer ¶
type WebSocketServer struct {
// contains filtered or unexported fields
}
func NewWebSocketServer ¶
func NewWebSocketServer(api ServerAPI) *WebSocketServer
func (*WebSocketServer) ServeHTTP ¶
func (wss *WebSocketServer) ServeHTTP(writer http.ResponseWriter, request *http.Request)
Click to show internal directories.
Click to hide internal directories.