I am trying to read a file from a PC through vxworks using standard
FTP commands which works fine when the file is less than 2MB.

But the problem occurs when I attempt to read a file which is greater
the 2MB. as my buffer size is just 2MB i first copy the first 2MB of
the file from PC and then stop but keep the FTP connection open, then
I wait for the buffer to get empty and then as soon as i have space I
read more from the PC file. It works fine for some time but somehow
the connection gets dropped everytime after a certain time and my
vxworks targets keeps reading some junk data as it has not read the
complete file.

Can anyone pleasee help me...?

Is this timeout..?

or idle disconnect?