The receiver doesn't know where the file's data ends and the filename of the next file starts.
You have to send the length of each file.
Otherwise it's impossible to separate the
TCP/
IP datastream into different files.
Code:
filename<CR><LF>filelength<CR><LF>file content