What is being done incorrectly? (Java Server/Socket Programming)
I have a little problem making servers and sockets connect. I made sure IPs are valid, so it's not an issue of the addresses not matching. Nor is it the port that doesn't match(I've tested this, as well).

The following is the server handler

<pre><code>class ServerConnect extends Thread
{
   // ...
   public ServerConnect(int port, String pass) throws IOException
   {
      // ...
      this.start();
   }
   
   public void run()
   {
      try
      {
         // ...
         while (! server.isClosed()) // Make Connections
         {
            Socket newClient = server.accept();
            System.out.println("Connection Accepted!");
            // ...
         }
            
      }
      // ...
   }
}</code></pre>

And this is the socket connector
<pre><code>class ClientConnect extends Thread
{
   // ...
   public ClientConnect(InetAddress ip, int port, String pass)
   {
      try
      {
         System.out.println("Connecting to host:\t" + ip.toString() + ":" + port);
         client = new Socket(ip, port);
         output = new PrintWriter(client.getOutputStream(), true);
         input = new Scanner(client.getInputStream());
         // ...
      }
      // ...
   }
   // ...
}</pre></code>

First, I tried testing locally. I entered my IP, and the IP 127.0.0.1, and both connected me to the server I had set up locally. But, then I tried from another IP, and here's what happened. The thread that was making the connection froze for a short while, then simply skipped down to the exception and told me that it couldn't find a host, and the host never says that it accepted a connection. If it helps, I'm using the port 4424 to connect with the server. Is there anything that could cause this in my code, or is there something I'm not doing to prevent this?

Also, please let me know if I'm not providing enough information. I've done plenty of testing, and can do more to help figure out what is wrong.
What is being done incorrectly? (Java Server/Socket Programming)
===

I have a little problem making servers and sockets connect. I made sure IPs are valid, so it's not an issue of the addresses not matching. Nor is it the port that doesn't match(I've tested this, as well).

The following is the server handler

<pre><code>class ServerConnect extends Thread
{
   // ...
   public ServerConnect(int port, String pass) throws IOException
   {
      // ...
      this.start();
   }
   
   public void run()
   {
      try
      {
         // ...
         while (! server.isClosed()) // Make Connections
         {
            Socket newClient = server.accept();
            System.out.println("Connection Accepted!");
            // ...
         }
            
      }
      // ...
   }
}</code></pre>

And this is the socket connector
<pre><code>class ClientConnect extends Thread
{
   // ...
   public ClientConnect(InetAddress ip, int port, String pass)
   {
      try
      {
         System.out.println("Connecting to host:\t" + ip.toString() + ":" + port);
         client = new Socket(ip, port);
         output = new PrintWriter(client.getOutputStream(), true);
         input = new Scanner(client.getInputStream());
         // ...
      }
      // ...
   }
   // ...
}</pre></code>

First, I tried testing locally. I entered my IP, and the IP 127.0.0.1, and both connected me to the server I had set up locally. But, then I tried from another IP, and here's what happened. The thread that was making the connection froze for a short while, then simply skipped down to the exception and told me that it couldn't find a host, and the host never says that it accepted a connection. If it helps, I'm using the port 4424 to connect with the server. Is there anything that could cause this in my code, or is there something I'm not doing to prevent this?

Also, please let me know if I'm not providing enough information. I've done plenty of testing, and can do more to help figure out what is wrong.