Пример #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})
}