I have been trying to write a simple FTP client using the BSD socket functions, but find I have 2 problems:
1. When trying to use the recv() function when specifying a buffer size smaller than the packet size transmitted by the server I get a memory corrupt error (trapped in the sys_error() function of net_config.c). Ie the server sends blocks of data in 1460 byte chunks and I call the recv function with a buffer of 1024 bytes, so I get the server packet in 2 chunks. If I call the recv() function with a buffer of > 1460 bytes then it seems to work, although I saw it fail with memory corruption once.
2. When the server has finished sending the data it closes the data connection, however the recv() function has not yet read the last packet, but cannot as the recv() call now returns SCK_EINVALID, ie I lose the final packet of data.
Anyone else had these issues?
I am going back to the slightly more tedious but as far as I know working method of TCP/IP programming with RL-TCPnet!!
The BSD memory corruption has been corrected in MDK4.22
Ok, didnt know V4.22 was out, I thought I was on the notification mailing list. i will download and test.
Does this also address the issue of dropping the last packet?
Only the BSD memory corruption. Please contact support for the issue of dropping the last packet.
Ok, I can confirm the new version does fix the meory problems I was having, but does not address the issue of the last packet.