def data(payload, end_stream: true)
      # Split data according to each frame is smaller enough
      # TODO: consider padding?
      max_size = @connection.remote_settings[:settings_max_frame_size]

      if payload.bytesize > max_size
        payload = chunk_data(payload, max_size) do |chunk|
          send(type: :data, flags: [], payload: chunk)
        end
      end

      flags = []
      flags << :end_stream if end_stream
      send(type: :data, flags: flags, payload: payload)
    end
def data(payload, end_stream: true)
      # Split data according to each frame is smaller enough
      # TODO: consider padding?
      max_size = @connection.remote_settings[:settings_max_frame_size]

      if payload.bytesize > max_size
        payload = chunk_data(payload, max_size) do |chunk|
          send(type: :data, flags: [], payload: chunk)
        end
      end

      flags = []
      flags << :end_stream if end_stream
      send(type: :data, flags: flags, payload: payload)
    end
Sends DATA frame containing response payload.

 @param payload [String]
 @param end_stream [Boolean] indicates last response DATA frame