Are you basing your code on the WIP FTP sample? If so, the code in the WIP_CEV_WRITE event is not quite right.
wip_write() only appears to load your data in the the channel/socket TX buffer. IT DOES NOT push the data out the buffer. So when wip_write() returns a value that indicates all your data has been sent, it actually hasn’t been TX’d to the client yet - only queued in the buffer to go in the next TCP packet.
The WIP FTP sample shows that after wip_write() returns that all your data has been sent, you need to call wip_close(). THIS IS NOT CORRECT. wip_close() will immediately CLOSE the channel and dump any pending data in the TX buffer…which is why you’re only seeing the first 2k of your data being transmitted.
Instead of calling wip_close(), call wip_shutdown() with the appropriate values to shutdown the write operation. This will wait until the TX buffer is empty before closing the connection and waiting for read data (if required).
I’ve just been through this for a client - and the documentation is not all that flash, and the samples are obscure.
Let us know how you get on.