Method: Aws::AsyncClientStubs::StubStream#data

Defined in:
lib/aws-sdk-core/async_client_stubs.rb

#data(bytes, options = {}) ⇒ Object



63
64
65
66
67
68
69
70
71
# File 'lib/aws-sdk-core/async_client_stubs.rb', line 63

def data(bytes, options = {})
  if options[:end_stream]
    @state = :closed
  else
    decoder = Aws::EventStream::Decoder.new
    event = decoder.decode_chunk(bytes).first
    @send_events << decoder.decode_chunk(event.payload.read).first
  end
end