# File lib/em-http/client.rb, line 867
    def process_websocket
      return false if @data.empty?

      # slice the message out of the buffer and pass in
      # for processing, and buffer data otherwise
      buffer = @data.read
      while msg = buffer.slice!(/\000([^\377]*)\377/n)
        msg.gsub!(/\A\x00|\xff\z/n, '')
        @stream.call(msg)
      end

      # store remainder if message boundary has not yet
      # been received
      @data << buffer if not buffer.empty?

      false
    end