Sending files over TCP
Sending files over TCP
Sending files over TCP
Sending files over TCP
Sending files over TCP
Sending files over TCP Sending files over TCP Sending files over TCP Sending files over TCP Sending files over TCP Sending files over TCP Sending files over TCP Sending files over TCP
Sending files over TCP Sending files over TCP
Sending files over TCP
Go Back  Xtreme Visual Basic Talk > > > Sending files over TCP


Reply
 
Thread Tools Display Modes
  #1  
Old 01-22-2011, 06:40 PM
GonGon GonGon is offline
Newcomer
 
Join Date: May 2009
Posts: 16
Question Sending files over TCP


Hi!
I'm currently developing a new system and I need to be able to upload a file from my computer to another (the server). I'm using TCP right now but I might use UDP in the future. The server I've made has multi threading so it can receive files from me while also serving another user with for example account information.

The upload part should work like this:

Client side:
1. Check the chosen files size so that it dont exceed 5 gigabytes.
2. If (1.) is ok, send the file size in bytes to the server so it knows how long it should continue to receive info from the client.

Here comes the part that is a little tricky for me as I dont have much experience with TCP.

3. ?"Take apart" the file into bytes, save it in a ?byte array? and send that to the server while also showing the upload progress in a progress bar.

Server side:
4. When everything has been received, it all needs to be made into a copy of the file just sent from the client and saved in for example (C:\Received).

Is this somewhat a correct way to do this?

Any code example for sending and receiving the file and showing the upload progress is extremely appreciated.

Thanks in advance!
Reply With Quote
  #2  
Old 01-25-2011, 01:20 PM
GonGon GonGon is offline
Newcomer
 
Join Date: May 2009
Posts: 16
Default

Never mind! I figured it out by myself.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Sending files over TCP
Sending files over TCP
Sending files over TCP Sending files over TCP
Sending files over TCP
Sending files over TCP
Sending files over TCP Sending files over TCP Sending files over TCP Sending files over TCP Sending files over TCP Sending files over TCP Sending files over TCP
Sending files over TCP
Sending files over TCP
 
Sending files over TCP
Sending files over TCP
 
-->