473,387 Members | 1,548 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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
0 1405

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

Similar topics

6
by: x. zhang | last post by:
Hi Guys, We know that we can use <input type=file ...> to upload one file per time to the server. My question is if there are some way to upload multiple files per time to the server. (Of...
0
by: CS | last post by:
Dear all, I would like to know whether it is possible to send multiple files in 1 fax? I noticed from some sample code, I can only specify 1 faxdocument.body in the code. Is there a workaround?...
2
by: moondaddy | last post by:
I have a asp.net app where a user will need to download multiple files at once. Below is some sample code I'm using to download a single file which works perfectly, however, rather than a single...
5
by: cybersangeeth | last post by:
Hi, I need to read 1KB each time from multiple files in a folder and pass it to a byte array in a struct to be sent through a socket. I'm a C++ newbie. I managed to read 1KB each time from one...
3
by: Klaas Vantournhout | last post by:
Hi, Recently I obtained a problem with virtual inheritance when implementing it in multiple files. To present the problem I have included at the bottom of this post the code of the 4 files. I...
2
by: Andrew Butchart | last post by:
We have an intranet application that hosts internal pdf documents about our products. I've recently discovered that the users have a very tedious time whenever they have to send multiple documents...
1
by: pankhudi | last post by:
How can i send multiple files of different lenghts over a network and using the same socket without the need of closing it in between. and what if this is to be done in JAVA ?
10
by: kimiraikkonen | last post by:
Hi, I have an app which has a listbox and when i double click an associated fileS, i want their paths to be added into listbox in my application. This code works good when i try to open a...
43
by: bonneylake | last post by:
Hey Everyone, Well this is my first time asking a question on here so please forgive me if i post my question in the wrong section. What i am trying to do is upload multiple files like gmail...
7
by: MyWaterloo | last post by:
I am currently using this code to send an appointment to Outlook. It sends the info to a form called "frmAppointments" and then to Outlook. This code works great to send the record that is in focus. ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.