Versions in this module Expand all Collapse all v1 v1.0.1 Sep 18, 2024 v1.0.0 May 17, 2024 Changes in this version + const DefaultRPCTimeout + const REQUEST_BATCH_SIZE_LIMIT + func Listen(addr string, maxOpenConnections int) (listener net.Listener, err error) + func MaxBytesHandler(h http.Handler, maxBytes int64) http.Handler + 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 RegisterRPCFuncs(mux *http.ServeMux, funcMap map[string]*RPCFunc, logger log.Logger) + func Serve(ctx context.Context, listener net.Listener, handler http.Handler, ...) error + func ServeTLS(ctx context.Context, listener net.Listener, handler http.Handler, ...) error + 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{}) *RPCFunc + func NewWSRPCFunc(f interface{}) *RPCFunc + func (rf *RPCFunc) Call(ctx context.Context, params json.RawMessage) (interface{}, error) + func (rf *RPCFunc) Timeout(d time.Duration) *RPCFunc + type WebsocketManager struct + func NewWebsocketManager(logger log.Logger, funcMap map[string]*RPCFunc, ...) *WebsocketManager + func (wm *WebsocketManager) WebsocketHandler(w http.ResponseWriter, r *http.Request)