I have a tcp client - server implementation running in the same program, on different background worker threads. There will be instances of this program on multiple computers so they can send and receive files between each other. I can send files sequentially between computers using network stream, but how would I send multiple files at the same time from computer A to B.
Sending multiple files over one connection ( socket ) is fine, but having multiple network streams sending data to a client, the client doesn't know which chunk of data is apart of which file ?
Would it be possible for the client to connect twice to the server (on a difference port, as a 'random'/ unused port is assigned to the connection) and then each connection have its own stream, allowing 2 files to be sent at the same time?
Thanks for your time and effort.