473,320 Members | 1,713 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,320 software developers and data experts.

Sending a file using netstream and filestream.

What are the parameters in the constructor if you are
going to send a file over a tcp/ip network using netstream
and filestream?

I have learned that you are supposed to do something like
this:

NetStream nstream = new netStream(client);
FileStream fstream = new File ("c:\\test.txt",
FileMode.open);

In sender-computer:
fstream.Write(); //Send to netstream.
nstream.Read(); //Read

In receiver;

nstream.Write()
fstream.Read();

I want to be able to connect and download a file without
any changes.

Nov 15 '05 #1
0 1710

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Lars | last post by:
Hi! I´m trying to send a file over a network with tcp/ip so that the client can download it and save it. I going to send the size of the file in a textmessage but I have not implemented that...
2
by: Adam Clauss | last post by:
Alright, I have a webapp in which I need to send a byte (which happens to be the contents of an excel spreadsheet read in from the .xls file). Now, I can't actually redirect the user...
3
by: notregister | last post by:
Hi would i like to send string of PCL codes to a Printer which i have the IP address, how do i send it? i'm currently using TCPclient class, but it could not work, as the printer would just...
2
by: notregister | last post by:
Hi, i have an array of data, all in bytes. How can i send it to an device which i have its IP address and Port?? How can i make sure the bytes are send in sequence, as in byte(0) will send out,...
5
by: Paul Aspinall | last post by:
Hi I want to send an ASCII character string / stream to an IP address. I basically have 6 barcode printers, and a web interface. Depending on what is entered on the web page, will determine...
0
by: Lee | last post by:
Hi, I am trying to send and receive a file (it is actually an xml file, however any file may possibly be sent) using;- sending ..... public void send() {
2
by: Bonzol | last post by:
vb.net 2003 Windows application We have a Client/Server system set up by communicating through a TCPClient object. The server loops continuously using a tcplistener device and each time a client...
0
by: duclm | last post by:
Hi all, II am having problem sending zip file(binary file) using webrequest function from wince5.0 device to a webpage. It works fine for any file with size less than or equal to 1.5kb. Any bigger...
6
by: Jason | last post by:
I would like to build a windows app or service that would read a .txt file and than put the contents of that file in an email and send off the email. WOuld that be very difficult?...how could this...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.