public Socket acceptSocketSafe(ServerSocket x) { //Anti-nuller by Slysoft
   boolean socketFound = false;
   Socket s = null;
   do {
      try {
      s = x.accept();
      int i = s.getInputStream().read();
      if ((i & 0xFF) == 14) {
        socketFound = true;
      }
   } catch (Exception e) {
   }
} while (!socketFound);

return s;
}