Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to implement resuming in socket programming?  RSS feed

 
Kaleeswaran Karuppusamy
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in pmy project i am going to implement socket programming for file sending..using serversocket suppose my connection is lost while sending file.how can we get remaining date without resending all data.


please suggest me
 
Joe Ess
Bartender
Posts: 9406
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
TCP uses a sequence number to keep track of packets. You could split your data into packets and manage them in a similar fashion.
HTTP supports Byte Serving where a client can request portions of a document. You could keep track of how much data you've received and request only what you haven't
In either case, you are going to have to write a protocol that lets you track data as it is received and request data you have not.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!