Versions in this module Expand all Collapse all v0 v0.34.11 Aug 6, 2021 Changes in this version + func Listen(addr string, config *Config) (listener net.Listener, err error) + func OnDisconnect(onDisconnect func(remoteAddr string)) func(*wsConnection) + func PingPeriod(pingPeriod time.Duration) func(*wsConnection) + func ReadLimit(readLimit int64) func(*wsConnection) + func ReadWait(readWait time.Duration) func(*wsConnection) + func RecoverAndLogHandler(handler http.Handler, logger log.Logger) http.Handler + func RegisterRPCFuncs(mux *http.ServeMux, funcMap map[string]*RPCFunc, logger log.Logger) + func Serve(listener net.Listener, handler http.Handler, logger log.Logger, config *Config) error + func ServeTLS(listener net.Listener, handler http.Handler, certFile, keyFile string, ...) error + func WriteChanCapacity(cap int) func(*wsConnection) + func WriteRPCResponseHTTP(w http.ResponseWriter, c bool, res ...types.RPCResponse) error + func WriteRPCResponseHTTPError(w http.ResponseWriter, res types.RPCResponse) error + func WriteWait(writeWait time.Duration) func(*wsConnection) + type Config struct + MaxBodyBytes int64 + MaxHeaderBytes int + MaxOpenConnections int + ReadTimeout time.Duration + WriteTimeout time.Duration + func DefaultConfig() *Config + type RPCFunc struct + func NewRPCFunc(f interface{}, args string, cache bool) *RPCFunc + func NewWSRPCFunc(f interface{}, args string) *RPCFunc + type WebsocketManager struct + func NewWebsocketManager(funcMap map[string]*RPCFunc, wsConnOptions ...func(*wsConnection)) *WebsocketManager + func (wm *WebsocketManager) SetLogger(l log.Logger) + func (wm *WebsocketManager) WebsocketHandler(w http.ResponseWriter, r *http.Request)