SocketChannel read() throws IOException

Hi!

Duringprivate SocketChannel channel;

private ByteBuffer inBuffer;

channel.read(inBuffer);

an IOException (An established connection was aborted by the software in your host machine) was thrown. Does any one know the reason of this unpleasent event? I believe the channel is ok (just created)... maybe I try to write to fast to just created channel? Maybe I should wait for 3-5 seckonds?

Please help!!!

[509 byte] By [KoP4iKa] at [2007-10-3 8:19:46]
# 1
There is no such thing as writing too fast to a socket or socket channel, don't worry about that, or introducing delays.There's a post from me about this error at http://forum.java.sun.com/thread.jspa?forumID=11&threadID=748677
ejpa at 2007-7-15 3:25:20 > top of Java-index,Archived Forums,Socket Programming...
# 2

You already know the cause - you posted it.

"An established connection was aborted by the software in your host machine"

Basically, software (Winsock on Windows), has aborted the connection due to the lovely use of LSPs (Linked/Layered Service Providers) used by anti-virus (and viruses themselves) to control the network services on a computer.

McAfee VirusScan 8 and Norton AntiVirus 2004 are known to cause this, however, other firewall/anti-x programs can do this.

watertownjordana at 2007-7-15 3:25:20 > top of Java-index,Archived Forums,Socket Programming...