gosock

package
v0.0.0-...-cf0bdef Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 16, 2017 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateAssetHandler

func CreateAssetHandler(assetPath string, apiPath string, enableSourceMap bool) mchain.Handler

Types

type WebSocketServer

type WebSocketServer struct {
	// contains filtered or unexported fields
}

func NewWebSocketServer

func NewWebSocketServer(handlers *gotalk.Handlers) *WebSocketServer

func NewWebSocketServerWithOptions

func NewWebSocketServerWithOptions(handlers *gotalk.Handlers, opts *WebSocketServerOptions) *WebSocketServer

func (*WebSocketServer) ServeHTTP

func (server *WebSocketServer) ServeHTTP(w http.ResponseWriter, r *http.Request) error

type WebSocketServerOptions

type WebSocketServerOptions struct {
	Limits            gotalk.Limits
	OnAccept          gotalk.SockHandler
	HeartbeatInterval time.Duration
	OnHeartbeat       func(load int, t time.Time)
	Upgrader          websocket.Upgrader
}

func DefaultWebSocketServerOptions

func DefaultWebSocketServerOptions() WebSocketServerOptions

type XNetWebSocketServer

type XNetWebSocketServer struct {
	Server *websocket.Server
	// contains filtered or unexported fields
}

func NewXNetWebSocketServer

func NewXNetWebSocketServer(handlers *gotalk.Handlers, limits gotalk.Limits, onAccept gotalk.SockHandler) *XNetWebSocketServer

func (*XNetWebSocketServer) ServeHTTP

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL