mirror of https://github.com/grpc/grpc-go.git
make comment on invoke/sendmsg more clear
This commit is contained in:
parent
33966f5391
commit
11ef22ebfb
5
call.go
5
call.go
|
@ -97,8 +97,9 @@ func sendRequest(ctx context.Context, codec Codec, compressor Compressor, callHd
|
||||||
return stream, nil
|
return stream, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Invoke is called by the generated code. It sends the RPC request on the
|
// Invoke sends the RPC request on the wire and returns after response is received.
|
||||||
// wire and returns after response is received.
|
// Invoke is called by generated code. Also users can call Invoke directly when it
|
||||||
|
// is really needed in their use cases.
|
||||||
func Invoke(ctx context.Context, method string, args, reply interface{}, cc *ClientConn, opts ...CallOption) (err error) {
|
func Invoke(ctx context.Context, method string, args, reply interface{}, cc *ClientConn, opts ...CallOption) (err error) {
|
||||||
var c callInfo
|
var c callInfo
|
||||||
for _, o := range opts {
|
for _, o := range opts {
|
||||||
|
|
|
@ -67,7 +67,8 @@ type Stream interface {
|
||||||
// breaks.
|
// breaks.
|
||||||
// On error, it aborts the stream and returns an RPC status on client
|
// On error, it aborts the stream and returns an RPC status on client
|
||||||
// side. On server side, it simply returns the error to the caller.
|
// side. On server side, it simply returns the error to the caller.
|
||||||
// SendMsg is called by generated code.
|
// SendMsg is called by generated code. Also Users can call SendMsg
|
||||||
|
// directly when it is really needed in their use cases.
|
||||||
SendMsg(m interface{}) error
|
SendMsg(m interface{}) error
|
||||||
// RecvMsg blocks until it receives a message or the stream is
|
// RecvMsg blocks until it receives a message or the stream is
|
||||||
// done. On client side, it returns io.EOF when the stream is done. On
|
// done. On client side, it returns io.EOF when the stream is done. On
|
||||||
|
|
Loading…
Reference in New Issue