jsonrpc2.go
func (c *Conn) Notify(ctx context.Context, method string, params interface{}, opts ...CallOption) error {
	req := &Request{Method: method, Notif: true}
	if err := req.SetParams(params); err != nil {
		return err
	}
	for _, opt := range opts {
		if opt == nil {
			continue
		}
		if err := opt.apply(req); err != nil {
			return err
		}
	}
	_, err := c.send(ctx, &anyMessage{request: req}, false)
	return err
}
func (c *Conn) Notify(ctx context.Context, method string, params interface{}, opts ...CallOption) error {
	req := &Request{Method: method, Notif: true}
	if err := req.SetParams(params); err != nil {
		return err
	}
	for _, opt := range opts {
		if opt == nil {
			continue
		}
		if err := opt.apply(req); err != nil {
			return err
		}
	}
	_, err := c.send(ctx, &anyMessage{request: req}, false)
	return err
}
func ( c * Conn ) Notify ( ctx context . Context , method string , params interface { } , opts ... CallOption ) error { req := & Request { Method : method , Notif : true } if err := req . SetParams ( params ) ; err != nil { return err } for _ , opt := range opts { if opt == nil { continue } if err := opt . apply ( req ) ; err != nil { return err } } _ , err := c . send ( ctx , & anyMessage { request : req } , false ) return err }
// Notify is like Call, but it returns when the notification request
// is sent (without waiting for a response, because JSON-RPC
// notifications do not have responses).
Notify is like Call but it returns when the notification request is sent ( without waiting for a response because JSON - RPC notifications do not have responses ) .