467,877 Members | 1,201 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,877 developers. It's quick & easy.

How to send multiple files over tcp at the same time in c sharp?

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.
Nov 29 '10 #1
  • viewed: 1232

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by moondaddy | last post: by
3 posts views Thread by Klaas Vantournhout | last post: by
2 posts views Thread by Andrew Butchart | last post: by
10 posts views Thread by kimiraikkonen | last post: by
reply views Thread by MrMoon | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.