Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

IO Handling  RSS feed

 
Shyam Prasad Murarka
Ranch Hand
Posts: 209
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Readers,
I am having a problem with reading file from Server side.



I get the message that "Connection reset"
 
Shyam Prasad Murarka
Ranch Hand
Posts: 209
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Readers,
"input" is a BufferedInputStream object and bound to the getInputStream() of the Socket. "output" is a FileOutputStream connected to a File object.

On the Client side code is as follows:



The client side seems to be working fine.

I tried sending ".txt" files and ".gif" files but to no avail.
 
Shyam Prasad Murarka
Ranch Hand
Posts: 209
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Readers,
Sorry! But I did not flush() the streams. But I still get the message "Connection reset" after file transfer is complete.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!