This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Sockets and Internet Protocols and the fly likes Hi Help me Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Hi Help me" Watch "Hi Help me" New topic

Hi Help me

maha devan
Ranch Hand

Joined: Mar 16, 2004
Posts: 50
Hi I am beginner in sockets. PLs help me in this

I wrote a client code that reads a txt file and sends it to the server.The server code prints the file until it reaches EOF String.
I am getting all the stuffs printed out ,but em getting a exception like this

Connection AcceptedSocket[addr=/,port=1074,localport=8090]
Echoing Stringojhejwk
Echoing Stringqkodjsjd
Echoing Stringkoqsjdosa;
Exception in thread "main" Software caused connection abort: recv failed
at Method)
at Source)
at sun.nio.cs.StreamDecoder$CharsetSD.readBytes(Unknown Source)
at sun.nio.cs.StreamDecoder$CharsetSD.implRead(Unknown Source)
at Source)
at Source)
at Source)
at Source)
at Source)
at Serversocket.main(
Jose Botella
Ranch Hand

Joined: Jul 03, 2001
Posts: 2120
Welcome to the Ranch maha!

I might try to help if I could see the code, preferably properly indente, yes thank you.

Maybe you tried to close the socket while still a thread was blocked trying to read from it.

SCJP2. Please Indent your code using UBB Code
I agree. Here's the link:
subject: Hi Help me
It's not a secret anymore!