| | |
sending files over TCP
Please support our C# advertiser: Intel Parallel Studio Home
Thread Solved |
0
#21 Oct 11th, 2009
Ok, I kinda get what you are talking about, but Im not sure how to do that. your client
Problem: I just can't see how to add your serialized data to that.
Problem: or even how to parse that on the otherside.
Im trying, this just really isn't my area. Also, I wouldn't mind using additional ports. as my desktop is the server for this, and working with firewalls and routers is simple.
This isn't going to be a mass used application, I intend to use it for 2 purposes. 1) to share files with a couple of my friends, and 2) to have a reliable way to send/get data to and from my desktop when I am not home.
again thanks for the help.
C# Syntax (Toggle Plain Text)
private SendFileCompleteEventArgs SendFileWorker(string FileName) { SendFileCompleteEventArgs result = null; using (FileStream fs = new FileStream(FileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)) { using (TcpClient cli = new TcpClient()) { cli.Connect(this.endPoint); result = new SendFileCompleteEventArgs(FileName); result.Started = DateTime.Now; using (NetworkStream ns = cli.GetStream()) { StreamHelper.CopyStreamToStream(fs, ns, null); ns.Flush(); ns.Close(); } result.Completed = DateTime.Now; return result; } } }
Problem: I just can't see how to add your serialized data to that.
Problem: or even how to parse that on the otherside.
Im trying, this just really isn't my area. Also, I wouldn't mind using additional ports. as my desktop is the server for this, and working with firewalls and routers is simple.
This isn't going to be a mass used application, I intend to use it for 2 purposes. 1) to share files with a couple of my friends, and 2) to have a reliable way to send/get data to and from my desktop when I am not home.
again thanks for the help.
0
#22 Oct 11th, 2009
No problem. I have exams coming up so it might be a few days before I can get back to you on this.
0
#23 Oct 11th, 2009
That's alright
I am studding for the compTIA A+ exams myself. I will continue to attempt this and if I get any where with it I will post my results. Otherwise, when you get a chance, I would appreciate some more assistance. but if you don't get back to it I understand. you have been a big help.
Thanks again.
I am studding for the compTIA A+ exams myself. I will continue to attempt this and if I get any where with it I will post my results. Otherwise, when you get a chance, I would appreciate some more assistance. but if you don't get back to it I understand. you have been a big help.Thanks again.
0
#24 Oct 11th, 2009
Next monday fire up a new thread and upload the project you have so far and we'll go from there.
Good luck on your exam!
Good luck on your exam!
![]() |
Similar Threads
- How to synchronize a file upload with an insert in MySQL through Javascript-AJAX-PHP? (JavaScript / DHTML / AJAX)
- Sending files in socket problem/// (Java)
- sending files (Java)
- how to embed sound files in xml files? (C#)
- Sockets - listening and sending at the same time (TCP) (C++)
- Sending ByteBuffer on TCP and UDP Connection (Java)
- sending files over LAN thru C programs (C++)
- FTP-ing never felt so good (Web Browsers)
- hijack-log...thank for any help (Viruses, Spyware and other Nasties)
Other Threads in the C# Forum
- Previous Thread: msi silent install?
- Next Thread: script to run on the server
| Thread Tools | Search this Thread |
api bluetooth browsing bugs business community creepy declarations development events facebook facelift firefox google government hardware ibdg infrastructure internationalbusinessdevelopmentgroup internet investors jobs linkedin mapping marketing media month mozilla myspace network networking news php politics port protocol provider routers science sms social socialnetwork socket sockets tcp technology twitter vb.net warning web







