示例#1
0
func (sc *ServerCodec) ReadRequestBody(body interface{}) error {
	return bson.UnmarshalFromStream(sc.rwc, body)
}
示例#2
0
func (cc *ClientCodec) ReadResponseBody(body interface{}) error {
	return bson.UnmarshalFromStream(cc.rwc, body)
}
示例#3
0
func (sc *ServerCodec) ReadRequestHeader(r *rpc.Request) error {
	return bson.UnmarshalFromStream(sc.rwc, &RequestBson{r})
}
示例#4
0
func (cc *ClientCodec) ReadResponseHeader(r *rpc.Response) error {
	return bson.UnmarshalFromStream(cc.rwc, &ResponseBson{r})
}