NewClient returns a new Client with stream. NOTE(leventeliu): ownership of stream is passed through: io.Closer -> rpc.ClientCodec -> *rpc.Client Closing the *rpc.Client will cause io.Closer invoked.
(stream io.ReadWriteCloser)
| 41 | // io.Closer -> rpc.ClientCodec -> *rpc.Client |
| 42 | // Closing the *rpc.Client will cause io.Closer invoked. |
| 43 | func NewClient(stream io.ReadWriteCloser) (client *rpc.Client) { |
| 44 | return rpc.NewClientWithCodec(utils.GetMsgPackClientCodec(stream)) |
| 45 | } |