Versions in this module Expand all Collapse all v0 v0.34.22 Dec 28, 2022 Changes in this version + func Listen(addr string, maxOpenConnections int) (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 WriteCacheableRPCResponseHTTP(w http.ResponseWriter, res ...types.RPCResponse) error + func WriteChanCapacity(cap int) func(*wsConnection) + func WriteRPCResponseHTTP(w http.ResponseWriter, res ...types.RPCResponse) error + func WriteRPCResponseHTTPError(w http.ResponseWriter, httpCode int, 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 Option func(*RPCFunc) + func Cacheable(noCacheDefArgs ...string) Option + func Ws() Option + type RPCFunc struct + func NewRPCFunc(f interface{}, args string, options ...Option) *RPCFunc + func NewWSRPCFunc(f interface{}, args string, options ...Option) *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)