func NewServerCodec(conn io.ReadWriteCloser) rpc.ServerCodec { req := &bufferPair{proto.NewBuffer(nil), proto.NewBuffer(nil)} resp := &bufferPair{proto.NewBuffer(nil), proto.NewBuffer(nil)} return &serverCodec{conn, req, resp} }
func NewClientCodec(conn io.ReadWriteCloser) rpc.ClientCodec { req := &bufferPair{proto.NewBuffer(nil), proto.NewBuffer(nil)} resp := &bufferPair{proto.NewBuffer(nil), proto.NewBuffer(nil)} return &clientCodec{conn, req, resp} }