Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

java.net.SocketException: Software caused connection abort: socket write er

843790Dec 20 2006 — edited Dec 22 2006
Hi. I am writing a multiplayer chekers game. But i have a problem with networking. I got this error:java.net.SocketException: Software caused connection abort: socket write error
	try {
			s = new Socket(this.getCodeBase().getHost(), DEFAULT_PORT);
			in = new DataInputStream(s.getInputStream());
			out = new DataOutputStream(s.getOutputStream());
                        listener = new StreamListener(in, button_array);

			// Let the user know we are ready
			this.showStatus("Connected to "
					+ s.getInetAddress().getHostName()
					+ ":" + s.getPort());
		}
		catch (IOException e) { this.showStatus(e.toString()); }
and the other part of the code is...
try{
                        out.writeInt(c);
                        d=in.readInt();
                        System.out.println("-----"+d);
                    }
                    catch (IOException e2) {System.out.println(e2.toString()); };
Where am i wrong??
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 19 2007
Added on Dec 20 2006
4 comments
275 views