File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Socket Exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark " Socket Exception" Watch " Socket Exception" New topic
Author Socket Exception

Adam Berryl

Joined: Mar 11, 2005
Posts: 5
Hello everybody,
This is my first time, and i am looking for some answers in vain, nobody seems to know the answer, any suggestions would be greatly appreciated.

First; i am running a website and a DigiChatroom on windows XP machine, the problem i am having at the moment is: if i connect to the chatroom from the server or inside the network i can stay logged on for days if i need to, but if i connect from outside the network and i am idle for about 5 to 10 mins it will freeze the chatroom i can't type anything, but the chatroom window still open and then few minutes later the window will close and i get the following error message: "The connection to the DigiChat was unexpectedly broken. SocketException: Software caused connection Abort recv failed"

It was working fine before, I even disabled the firewalls on the server as well as the remote pc i was using, tried to identify where the problem is. same thing no changes, i heard that it could be a Tcp issue, but i don't understand what can cause this.

If anyone here can help me, it would be really appreciated

Thanking you in advance Java connection problems
Premil Jacob
Ranch Hand

Joined: Sep 10, 2004
Posts: 30
Since there is no data transfer between the client and the server for long time periods the external network probably disconnects you after a certain period of inactivity, so you could try sending a keepalive packet after a specific time period say every 5 mins.

Thanks,<br />Premil<br /> <br />SCJP 1.4
Adam Berryl

Joined: Mar 11, 2005
Posts: 5
Hello and thanks for your reply :-)

Hoe can I try sending a keepalive packet after a specific time?
But why do you think it suddenly started disconnecting users?

before we could stay connected for days if we wanted to, and now no more than 5 mins.

I really appreciate all your help :-)

Kind Regards
Ilja Preuss

Joined: Jul 11, 2001
Posts: 14112
Moving to Sockets and Internet Protocols...

The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
I agree. Here's the link:
subject: Socket Exception
It's not a secret anymore!