• Post Reply Bookmark Topic Watch Topic
  • New Topic

File transfer using sockets  RSS feed

 
Chris Brat
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have written a client server pair that sends a txt file from client to server over a LAN setup. When trying to use the same pair to transfer the same file over the internet the operation times out.
I am assuming that if I have coded correctly then the timeout is because of network traffic and routing from the firewall to the specific server machine on its own LAN? If this pressumptuous statement is correct, then how do I set the timeout to a longer time to give the app a chance to establish the connection?
Is I am totally hashing this thing up - please let me know? Any suggestions, comments and slagging are appreciated.
Chris
 
Vinod Chandana
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I guess it could be having a low SO_TIMEOUT. Try printing out this variable using getSoTimeout() on both the server and the client. If it is too low then try setting it to setSoTimeout(0) on both the server and the client. This would set the timeout to infinity. Hope this helps, if not send me a message.
Regards,
Vinod.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!