Documentation ¶
Index ¶
Constants ¶
Variables ¶
This section is empty.
Functions ¶
func ServerMaker ¶
func ServerMaker() (*server.Server, jrpctest.ClientMaker, func())
func WebsocketHandler ¶
WebsocketHandler returns a handler that serves JSON-RPC to WebSocket connections.
allowedOrigins should be a comma-separated list of allowed origin URLs. To allow connections with any origin, pass "*".
Types ¶
type Client ¶
func DialWebsocket ¶
DialWebsocket creates a new RPC client that communicates with a JSON-RPC server that is listening on the given endpoint.
The context is used for the initial connection establishment. It does not affect subsequent interactions with the client.
func DialWebsocketWithDialer ¶
func DialWebsocketWithDialer(ctx context.Context, endpoint, origin string, opts *websocket.DialOptions) (*Client, error)
that is listening on the given endpoint using the provided dialer.
type Codec ¶
func (*Codec) RemoteAddr ¶
Click to show internal directories.
Click to hide internal directories.