Original Post
Good morning, I am trying to connect a client to a server (both of them are running on the same machine) The client parses the address and port to connect to from a text box and validates them. Problem 1 x = new InetSocketAddress( address, iPort ); socket.connect( x ); This never throws an exception (I know because I am catching every possible type of exception it can throw). It seems to be able to connect to on any port on the host. How is that possible? Does the OS (Win XP in this case) open the port? Problem 2 If I input the value 256 it will be translated as 0.0.1.1 Again, I get the same problem. The client is able to connect to the specified IP (0.0.1.1 in this case) and an arbitrary port. Thanks