Re: Problem with FTP
- Posted by m_sabal Jan 08, 2010
- 1776 views
Here are a few suggestions (note: examples are based on eunet, from which Eu4 sockets are derived. Some of the procedure names may be a little different): 1) Poll the socket before each blocking send/recv call. Ex: status = eunet_poll(,100) 2) Use a non-blocking call instead. Ex: recvdata = eunet_recvfrom(socket,0) 3) If possible, figure out why the connection keeps dropping. The FTP program may be the lesser of several problem. 4) Modify the BLOCK_SIZE in sockets.e to be a smaller value. This will require more calls to recv for a given file, but you'll have more opportunities to check for a failed connection.
HTH, Michael J. Sabal