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
StartedServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=8090] Connection AcceptedSocket[addr=/127.0.0.1,port=1074,localport=8090] Echoing Stringojhejwk Echoing Stringqkodjsjd Echoing Stringkoqsjdosa; Closing Exception in thread "main" java.net.SocketException: Software caused connection abort: recv failed at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(Unknown Source) at sun.nio.cs.StreamDecoder$CharsetSD.readBytes(Unknown Source) at sun.nio.cs.StreamDecoder$CharsetSD.implRead(Unknown Source) at sun.nio.cs.StreamDecoder.read(Unknown Source) at java.io.InputStreamReader.read(Unknown Source) at java.io.BufferedReader.fill(Unknown Source) at java.io.BufferedReader.readLine(Unknown Source) at java.io.BufferedReader.readLine(Unknown Source) at Serversocket.main(Serversocket.java:19)
posted 11 years ago
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.