|
|
@ -70,6 +70,9 @@ class ReaderInterface { |
|
|
|
public: |
|
|
|
public: |
|
|
|
virtual ~ReaderInterface() {} |
|
|
|
virtual ~ReaderInterface() {} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// Upper bound on the next message size available for reading on this stream
|
|
|
|
|
|
|
|
virtual uint32_t NextMessageSize() = 0; |
|
|
|
|
|
|
|
|
|
|
|
/// Blocking read a message and parse to \a msg. Returns \a true on success.
|
|
|
|
/// Blocking read a message and parse to \a msg. Returns \a true on success.
|
|
|
|
///
|
|
|
|
///
|
|
|
|
/// \param[out] msg The read message.
|
|
|
|
/// \param[out] msg The read message.
|
|
|
@ -143,6 +146,8 @@ class ClientReader GRPC_FINAL : public ClientReaderInterface<R> { |
|
|
|
cq_.Pluck(&ops); /// status ignored
|
|
|
|
cq_.Pluck(&ops); /// status ignored
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
uint32_t NextMessageSize() GRPC_OVERRIDE {return call_.max_message_size();} |
|
|
|
|
|
|
|
|
|
|
|
bool Read(R* msg) GRPC_OVERRIDE { |
|
|
|
bool Read(R* msg) GRPC_OVERRIDE { |
|
|
|
CallOpSet<CallOpRecvInitialMetadata, CallOpRecvMessage<R>> ops; |
|
|
|
CallOpSet<CallOpRecvInitialMetadata, CallOpRecvMessage<R>> ops; |
|
|
|
if (!context_->initial_metadata_received_) { |
|
|
|
if (!context_->initial_metadata_received_) { |
|
|
@ -286,6 +291,8 @@ class ClientReaderWriter GRPC_FINAL : public ClientReaderWriterInterface<W, R> { |
|
|
|
cq_.Pluck(&ops); // status ignored
|
|
|
|
cq_.Pluck(&ops); // status ignored
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
uint32_t NextMessageSize() GRPC_OVERRIDE {return call_.max_message_size();} |
|
|
|
|
|
|
|
|
|
|
|
bool Read(R* msg) GRPC_OVERRIDE { |
|
|
|
bool Read(R* msg) GRPC_OVERRIDE { |
|
|
|
CallOpSet<CallOpRecvInitialMetadata, CallOpRecvMessage<R>> ops; |
|
|
|
CallOpSet<CallOpRecvInitialMetadata, CallOpRecvMessage<R>> ops; |
|
|
|
if (!context_->initial_metadata_received_) { |
|
|
|
if (!context_->initial_metadata_received_) { |
|
|
@ -345,6 +352,8 @@ class ServerReader GRPC_FINAL : public ReaderInterface<R> { |
|
|
|
call_->cq()->Pluck(&ops); |
|
|
|
call_->cq()->Pluck(&ops); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
uint32_t NextMessageSize() GRPC_OVERRIDE {return call_->max_message_size();} |
|
|
|
|
|
|
|
|
|
|
|
bool Read(R* msg) GRPC_OVERRIDE { |
|
|
|
bool Read(R* msg) GRPC_OVERRIDE { |
|
|
|
CallOpSet<CallOpRecvMessage<R>> ops; |
|
|
|
CallOpSet<CallOpRecvMessage<R>> ops; |
|
|
|
ops.RecvMessage(msg); |
|
|
|
ops.RecvMessage(msg); |
|
|
@ -411,6 +420,8 @@ class ServerReaderWriter GRPC_FINAL : public WriterInterface<W>, |
|
|
|
call_->cq()->Pluck(&ops); |
|
|
|
call_->cq()->Pluck(&ops); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
uint32_t NextMessageSize() GRPC_OVERRIDE {return call_->max_message_size();} |
|
|
|
|
|
|
|
|
|
|
|
bool Read(R* msg) GRPC_OVERRIDE { |
|
|
|
bool Read(R* msg) GRPC_OVERRIDE { |
|
|
|
CallOpSet<CallOpRecvMessage<R>> ops; |
|
|
|
CallOpSet<CallOpRecvMessage<R>> ops; |
|
|
|
ops.RecvMessage(msg); |
|
|
|
ops.RecvMessage(msg); |
|
|
|