conn.go
func (c *Conn) SendRequest(method string, params interface{}, resHandler func(res *ResCtx) error) (reqID string, err error) {
	id, err := shortid.UUID()
	if err != nil {
		return "", err
	}

	req := request{ID: id, Method: method, Params: params}
	if err = c.send(req); err != nil {
		return "", err
	}

	c.resRoutes.Set(req.ID, resHandler)
	return id, nil
}
func (c *Conn) SendRequest(method string, params interface{}, resHandler func(res *ResCtx) error) (reqID string, err error) {
	id, err := shortid.UUID()
	if err != nil {
		return "", err
	}

	req := request{ID: id, Method: method, Params: params}
	if err = c.send(req); err != nil {
		return "", err
	}

	c.resRoutes.Set(req.ID, resHandler)
	return id, nil
}
func ( c * Conn ) SendRequest ( method string , params interface { } , resHandler func ( res * ResCtx ) error ) ( reqID string , err error ) { id , err := shortid . UUID ( ) if err != nil { return " " , err } req := request { ID : id , Method : method , Params : params } if err = c . send ( req ) ; err != nil { return " " , err } c . resRoutes . Set ( req . ID , resHandler ) return id , nil }
// SendRequest sends a JSON-RPC request through the connection with an auto generated request ID.
// resHandler is called when a response is returned.
SendRequest sends a JSON - RPC request through the connection with an auto generated request ID . resHandler is called when a response is returned .