Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewClientCodec ¶
func NewClientCodec(rwc io.ReadWriteCloser) rpc.ClientCodec
NewClientCodec returns a new rpc.Client.
A ClientCodec implements writing of RPC requests and reading of RPC responses for the client side of an RPC session. The client calls WriteRequest to write a request to the connection and calls ReadResponseHeader and ReadResponseBody in pairs to read responses. The client calls Close when finished with the connection. ReadResponseBody may be called with a nil argument to force the body of the response to be read and then discarded.
func NewServerCodec ¶
func NewServerCodec(rwc io.ReadWriteCloser) rpc.ServerCodec
NewServerCodec returns a new rpc.ServerCodec.
A ServerCodec implements reading of RPC requests and writing of RPC responses for the server side of an RPC session. The server calls ReadRequestHeader and ReadRequestBody in pairs to read requests from the connection, and it calls WriteResponse to write a response back. The server calls Close when finished with the connection. ReadRequestBody may be called with a nil argument to force the body of the request to be read and discarded.
Types ¶
type DecodeReader ¶
type DecodeReader interface { io.ByteReader io.Reader }
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
A Decoder manages the receipt of type and data information read from the remote side of a connection.
func NewDecoder ¶
func NewDecoder(r DecodeReader) *Decoder
NewDecoder returns a new decoder that reads from the io.Reader.
type Encoder ¶
type Encoder struct {
// contains filtered or unexported fields
}
An Encoder manages the transmission of type and data information to the other side of a connection.
func NewEncoder ¶
NewEncoder returns a new encoder that will transmit on the io.Writer.
Directories
¶
Path | Synopsis |
---|---|
Package empty is a generated protocol buffer package.
|
Package empty is a generated protocol buffer package. |
Package internal is a generated protocol buffer package.
|
Package internal is a generated protocol buffer package. |
Package wirepb is a generated protocol buffer package.
|
Package wirepb is a generated protocol buffer package. |