Documentation ¶
Index ¶
- Variables
- func Dial(u string) (jsonrpc.Conn, error)
- func DialContext(ctx context.Context, u string) (jsonrpc.Conn, error)
- func ListenAndServe(u string, srv *server.Server, opts map[string]any) error
- func RegisterDialer(fn dialerFunc, names ...string)
- func RegisterHandler(fn handlerFunc, names ...string)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrSchemeNotSupported = errors.New("url scheme not supported")
View Source
var HttpHandler = http.HttpHandler
View Source
var HttpWebsocketHandler = func(srv *server.Server, origins []string) gohttp.Handler { cwss := WebsocketHandler(srv, origins) chttp := HttpHandler(srv) return gohttp.HandlerFunc(func(w gohttp.ResponseWriter, r *gohttp.Request) { if r.Header.Get("upgrade") != "" { cwss.ServeHTTP(w, r) return } chttp.ServeHTTP(w, r) }) }
View Source
var WebsocketHandler = websocket.WebsocketHandler
Functions ¶
func ListenAndServe ¶ added in v0.2.23
ListenAndServe
func RegisterDialer ¶ added in v0.2.23
func RegisterDialer(fn dialerFunc, names ...string)
func RegisterHandler ¶ added in v0.2.23
func RegisterHandler(fn handlerFunc, names ...string)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.