lib/grpc_kit/session/stream.rb in grpc_kit-0.3.3 vs lib/grpc_kit/session/stream.rb in grpc_kit-0.3.4

- old
+ new

@@ -9,12 +9,12 @@ module GrpcKit module Session class Stream extend Forwardable - delegate %i[end_write end_write?] => :@pending_send_data - delegate %i[end_read end_read?] => :@pending_recv_data + delegate %i[end_write?] => :@pending_send_data + delegate %i[end_read?] => :@pending_recv_data delegate %i[close close_remote close_local close? close_remote? close_local?] => :@status attr_reader :headers, :pending_send_data, :pending_recv_data, :trailer_data, :status attr_accessor :inflight, :stream_id @@ -28,9 +28,17 @@ @inflight = false @trailer_data = {} @status = GrpcKit::Session::StreamStatus.new @draining = false + end + + def end_write + @pending_send_data.end_write + end + + def end_read + @pending_recv_data.end_read end # @return [void] def drain @draining = true