# File lib_core/rucy/writer.rb, line 100
    def write(messg)
      @send_size += messg.length
      if (@spooling) then
        if (@buffer.length + messg.length < BUFFERING_THRESHOLD) then
          @buffer << messg
        else
          @spooling = false
          if (! @request.conn_closed? && ! @response.conn_closed? && (@response.has_header? 'Content-Length')) then
            @response.conn_keep_alive(@request.version)
          else
            @response.conn_close
          end
          @socket.write(make_head)
          buffering(messg)
        end
      else
        buffering(messg)
      end

      nil
    end