code: public void run() {
        /**
          * Ensure we start fresh.
          */
      getLogger().debug("performing socket cleanup prior to entering loop for {}",  name);
      closeServerSocket();
      closeAllAcceptedSockets();
      getLogger().debug("socket cleanup complete for {}", name);       
      active = true;
  
      // start the server socket
      try {
        serverSocket = new ServerSocket(port);
      } catch (Exception e) {
        getLogger().error(
          "error starting SocketReceiver (" + this.getName()
          + "), receiver did not start", e);
        active = false;
        doShutdown();
  
        return;
      }
  
      Socket socket = null;
  
      try {
        getLogger().debug("in run-about to enter while isactiveloop");
  
        active = true;
  
        while (!rThread.isInterrupted()) {
          // if we have a socket, start watching it
          if (socket != null) {
            getLogger().debug("socket not null - creating and starting socketnode");
            socketList.add(socket);
  
            XMLSocketNode node = new XMLSocketNode(decoder, socket, this);
            node.setLoggerRepository(this.repository);
            new Thread(node).start();
            socket = null;
          }
  
          getLogger().debug("waiting to accept socket");
  
          // wait for a socket to open, then loop to start it
          socket = serverSocket.accept();
          getLogger().debug("accepted socket");
        }
  
        // socket not watched because we a no longer running
        // so close it now.
        if (socket != null) {
          socket.close();
        }
      } catch (Exception e) {
        getLogger().warn(
          "socket server disconnected, stopping");
      }
    }
docs: Loop, accepting new socket connections.