This week's giveaway is in the Java in General forum.
We're giving away four copies of Java Challengers and have Rafael del Nero on-line!
See this thread for details.
Win a copy of Java Challengers this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • paul wheaton
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • Mikalai Zaikin
  • Himai Minh

File transfer using sockets

 
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Politics is a circus designed to distract you from what is really going on. So is this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic