// Call processes a remote call
965166
func (r *RemoteService) Call(ctx context.Context, req *protos.Request) (*protos.Response, error) {
	c, err := util.GetContextFromRequest(req, r.server.ID)
	var res *protos.Response
	if err != nil {
		res = &protos.Response{
			Error: &protos.Error{
				Code: e.ErrInternalCode,
				Msg:  err.Error(),
			},
		}
	} else {
		res = processRemoteMessage(c, req, r)
	}

	if res.Error != nil {
		err = errors.New(res.Error.Msg)
	}

	defer tracing.FinishSpan(c, err)
	return res, nil
}
924877
func (nc *nccClient) call(name string, in interface{}, out interface{}) error {
	nc.lock.RLock()
	client := nc.client
	nc.lock.RUnlock()
	if client == nil {
		return fmt.Errorf("Not connected")
	}
	ch := make(chan error, 1)
	go func() {
		ch <- client.Call(name, in, out)
	}()
	select {
	case err := <-ch:
		return err
	case <-time.After(nccRPCTimeout):
		return fmt.Errorf("RPC call timed out after %v", nccRPCTimeout)
	}
}
1059037
func (_PublicResolver *PublicResolverRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
	return _PublicResolver.Contract.PublicResolverCaller.contract.Call(opts, result, method, params...)
}
354676
func (ch *Channel) call(req message, res ...message) error {
	if err := ch.send(req); err != nil {
		return err
	}

	if req.wait() {
		select {
		case e, ok := <-ch.errors:
			if ok {
				return e
			}
			return ErrClosed

		case msg := <-ch.rpc:
			if msg != nil {
				for _, try := range res {
					if reflect.TypeOf(msg) == reflect.TypeOf(try) {
						// *res = *msg
						vres := reflect.ValueOf(try).Elem()
						vmsg := reflect.ValueOf(msg).Elem()
						vres.Set(vmsg)
						return nil
					}
				}
				return ErrCommandInvalid
			}
			// RPC channel has been closed without an error, likely due to a hard
			// error on the Connection.  This indicates we have already been
			// shutdown and if were waiting, will have returned from the errors chan.
			return ErrClosed
		}
	}

	return nil
}
968725
func (a actions) call(r, c interface{}) (interface{}, error) {
	return a[0](r, c, a)
}
648671
func (o UnaryValidatorOutbound) Call(ctx context.Context, request *transport.Request) (*transport.Response, error) {
	if err := transport.ValidateRequest(request); err != nil {
		return nil, err
	}

	if err := transport.ValidateRequestContext(ctx); err != nil {
		return nil, err
	}

	return o.UnaryOutbound.Call(ctx, request)
}
133156
func (g *GroupOperations) Call(fn string, args ...interface{}) {
	g.e.callGroupMethod(g.relay, g.group, fn, args...)
}
88386
func (o *Outbound) Call(ctx context.Context, treq *transport.Request) (*transport.Response, error) {
	if treq == nil {
		return nil, yarpcerrors.InvalidArgumentErrorf("request for http unary outbound was nil")
	}

	return o.call(ctx, treq)
}
1027288
func (r *FlatChain) Call(err error, d interface{}) {
	r.op(err, d, func(ex error, v interface{}) {
		if r.next != nil {
			r.next.Call(err, d)
		}
	})
}
407249
func (l *State) call(function int, resultCount int, allowYield bool) {
	if l.nestedGoCallCount++; l.nestedGoCallCount == maxCallCount {
		l.runtimeError("Go stack overflow")
	} else if l.nestedGoCallCount >= maxCallCount+maxCallCount>>3 {
		l.throw(ErrorError) // error while handling stack error
	}
	if !allowYield {
		l.nonYieldableCallCount++
	}
	if !l.preCall(function, resultCount) { // is a Lua function?
		l.execute() // call it
	}
	if !allowYield {
		l.nonYieldableCallCount--
	}
	l.nestedGoCallCount--
}
670348
func (g *Group) Call(params ...Code) *Statement {
	s := Call(params...)
	g.items = append(g.items, s)
	return s
}
539804
func (smb SMBus) Process_call(cmd byte, value uint16) (uint16, error) {
	smb.Set_addr(smb.addr)
	ret, err := C.i2c_smbus_process_call(C.int(smb.bus.Fd()), C.__u8(cmd), C.__u16(value))
	if err != nil {
		ret = 0
	}
	return uint16(ret & 0x0FFFF), err
}
3553
func Call(provider, specPath string) (string, error) {
	var (
		stdOut bytes.Buffer
		stdErr bytes.Buffer
	)
	cmd := exec.Command(provider, specPath)
	cmd.Stdout = &stdOut
	cmd.Stderr = &stdErr
	err := cmd.Run()

	if err != nil {
		errstr := err.Error()
		if stdErr.Len() > 0 {
			errstr += ": " + strings.TrimSpace(stdErr.String())
		}
		return "", fmt.Errorf(errstr)
	}

	return strings.TrimSpace(stdOut.String()), nil
}
885900
func (obj *objectImpl) Call(method string, flags godbus.Flags, args ...interface{}) Call {
	return &callImpl{obj.object.Call(method, flags, args...)}
}
833299
func (c *BoundContract) Call(opts *CallOpts, out *Interfaces, method string, args *Interfaces) error {
	if len(out.objects) == 1 {
		result := out.objects[0]
		if err := c.contract.Call(&opts.opts, result, method, args.objects...); err != nil {
			return err
		}
		out.objects[0] = result
	} else {
		results := make([]interface{}, len(out.objects))
		copy(results, out.objects)
		if err := c.contract.Call(&opts.opts, &results, method, args.objects...); err != nil {
			return err
		}
		copy(out.objects, results)
	}
	return nil
}
1068048
func call(c context.Context, client *prpc.Client, req *request, out io.Writer) error {
	var inf, outf prpc.Format
	var message []byte
	switch req.format {

	default:
		var buf bytes.Buffer
		if _, err := buf.ReadFrom(req.message); err != nil {
			return err
		}
		message = buf.Bytes()
		inf = req.format.Format()
		outf = inf
	}

	// Send the request.
	var hmd, tmd metadata.MD
	res, err := client.CallRaw(c, req.service, req.method, message, inf, outf, prpc.Header(&hmd), prpc.Trailer(&tmd))
	if err != nil {
		return &exitCode{err, int(grpc.Code(err))}
	}

	// Read response.
	if _, err := out.Write(res); err != nil {
		return fmt.Errorf("failed to write response: %s", err)
	}
	return err
}
1131075
func (cli *client) Call(ctx context.Context, call *scheduler.Call) (mesos.Response, error) {
	return cli.httpDo(ctx, call)
}