def watch
      until(@stop)
        begin
          resultset = Kernel.select(@sockets.keys, nil, nil, nil)
          for sock in resultset[0]
            string = sock.gets
            if(sock.closed? || string.nil?)
              if(@sockets[sock][:closed])
                @sockets[sock][:closed].each do |pr|
                  pr[1].call(*([sock]+pr[0]))
                end
              end
              @sockets.delete(sock)
            else
              string = clean? ? do_clean(string) : string
              process(string.dup, sock)
            end
          end
        rescue Resync
          # break select and relisten #
        end
      end
      @runner = nil
    end
def watch
      until(@stop)
        begin
          resultset = Kernel.select(@sockets.keys, nil, nil, nil)
          for sock in resultset[0]
            string = sock.gets
            if(sock.closed? || string.nil?)
              if(@sockets[sock][:closed])
                @sockets[sock][:closed].each do |pr|
                  pr[1].call(*([sock]+pr[0]))
                end
              end
              @sockets.delete(sock)
            else
              string = clean? ? do_clean(string) : string
              process(string.dup, sock)
            end
          end
        rescue Resync
          # break select and relisten #
        end
      end
      @runner = nil
    end
Watch the sockets and send strings for processing