Use pure virtual functions at StreamFlowControlBase

pull/23282/head
Esun Kim 4 years ago
parent 0e646e537e
commit 1bb04d8420
  1. 2
      build_autogenerated.yaml
  2. 13
      src/core/ext/transport/chttp2/transport/flow_control.h

@ -2149,7 +2149,6 @@ libs:
- include/grpcpp/impl/server_initializer_impl.h
- include/grpcpp/impl/service_type.h
- include/grpcpp/resource_quota.h
- include/grpcpp/resource_quota_impl.h
- include/grpcpp/security/auth_context.h
- include/grpcpp/security/auth_metadata_processor.h
- include/grpcpp/security/auth_metadata_processor_impl.h
@ -2543,7 +2542,6 @@ libs:
- include/grpcpp/impl/server_initializer_impl.h
- include/grpcpp/impl/service_type.h
- include/grpcpp/resource_quota.h
- include/grpcpp/resource_quota_impl.h
- include/grpcpp/security/auth_context.h
- include/grpcpp/security/auth_metadata_processor.h
- include/grpcpp/security/auth_metadata_processor_impl.h

@ -333,8 +333,7 @@ class TransportFlowControl final : public TransportFlowControlBase {
};
// Fat interface with all methods a stream flow control implementation needs
// to support. gRPC C Core does not support pure virtual functions, so instead
// we abort in any methods which require implementation in the base class.
// to support.
class StreamFlowControlBase {
public:
StreamFlowControlBase() {}
@ -347,19 +346,19 @@ class StreamFlowControlBase {
// Using the protected members, returns an Action for this stream to be
// taken by the tranport.
virtual FlowControlAction MakeAction() { abort(); }
virtual FlowControlAction MakeAction() = 0;
// Bookkeeping for when data is sent on this stream.
virtual void SentData(int64_t /* outgoing_frame_size */) { abort(); }
virtual void SentData(int64_t /* outgoing_frame_size */) = 0;
// Bookkeeping and error checking for when data is received by this stream.
virtual grpc_error* RecvData(int64_t /* incoming_frame_size */) { abort(); }
virtual grpc_error* RecvData(int64_t /* incoming_frame_size */) = 0;
// Called to check if this stream needs to send a WINDOW_UPDATE frame.
virtual uint32_t MaybeSendUpdate() { abort(); }
virtual uint32_t MaybeSendUpdate() = 0;
// Bookkeeping for receiving a WINDOW_UPDATE from for this stream.
virtual void RecvUpdate(uint32_t /* size */) { abort(); }
virtual void RecvUpdate(uint32_t /* size */) = 0;
// Bookkeeping for when a call pulls bytes out of the transport. At this
// point we consider the data 'used' and can thus let out peer know we are

Loading…
Cancel
Save