# Functions
DefaultConfig returns a default configuration.
Listen starts a new net.Listener on the given address.
MaxBytesHandler wraps h in a handler that limits the size of the request body to at most maxBytes.
NewRPCFunc constructs an RPCFunc for f, which must be a function whose type signature matches one of these schemes:
func(context.Context) error func(context.Context) (R, error) func(context.Context, *T) error func(context.Context, *T) (R, error)
for an arbitrary struct type T and type R.
NewWebsocketManager returns a new WebsocketManager that passes a map of functions, connection options and logger to new WS connections.
NewWSRPCFunc behaves as NewRPCFunc, but marks the resulting function for use via websocket.
OnDisconnect sets a callback which is used upon disconnect - not Goroutine-safe.
PingPeriod sets the duration for sending websocket pings.
ReadLimit sets the maximum size for reading message.
ReadWait sets the amount of time to wait before a websocket read times out.
RegisterRPCFuncs adds a route to mux for each non-websocket function in the funcMap, and also a root JSON-RPC POST handler.
Serve creates a http.Server and calls Serve with the given listener.
Serve creates a http.Server and calls ServeTLS with the given listener, certFile and keyFile.
# Constants
DefaultRPCTimeout is the default context timeout for calls to any RPC method that does not override it with a more specific timeout.
# Structs
Config is a RPC server configuration.
RPCFunc contains the introspected type information for a function.
WebsocketManager provides a WS handler for incoming connections and passes a map of functions along with any additional params to new connections.