lib/core/client.rb
# do not using in multi threads
do not using in multi threads
do not using in multi threads
def write_response
      return if @message_queue.empty? && @write_chunk.empty?
      @write_chunk = @parser.out_transfer_message(@message_queue.shift) if @write_chunk.empty?
      begin
        remain_index = @socket.write_nonblock(@write_chunk)
        @write_chunk = @write_chunk[remain_index..-1]
      rescue IO::WaitWritable
      end
    end
def write_response return if @message_queue . empty? && @write_chunk . empty? @write_chunk = @parser . out_transfer_message ( @message_queue . shift ) if @write_chunk . empty? begin remain_index = @socket . write_nonblock ( @write_chunk ) @write_chunk = @write_chunk [ remain_index .. - 1 ] rescue IO :: WaitWritable end end
do not using in multi threads
do not using in multi threads
# may have remain from last write # stub nothing to do