I tried the following but the PC just hung up Socket s = new Socket(InetAddress.getByName(null),1234); ObjectOutputStream oos = new ObjectOutputStream(s.getOutputStream()); Any idea why this happens and suggestions how to overcome this problem?
I have lots of ideas, but I don't know for sure. First, where does InetAddress.getByName(null) take you? Second, does that place have a server set up at port 1234? Third, does that server have an Object InputStream set up? If you're going to tinker with sockets, open a socket to a web site and hook a reader up to it. Dump what you get to the console to make sure you got the right stuff.