Large files and TCP
Large files and TCP
Large files and TCP
Large files and TCP
Large files and TCP
Large files and TCP Large files and TCP Large files and TCP Large files and TCP Large files and TCP Large files and TCP Large files and TCP Large files and TCP
Large files and TCP Large files and TCP
Large files and TCP
Go Back  Xtreme Visual Basic Talk > > > Large files and TCP


Reply
 
Thread Tools Display Modes
  #1  
Old 06-26-2006, 06:01 PM
CyberDude CyberDude is offline
Centurion
 
Join Date: Jul 2003
Posts: 134
Question Large files and TCP


I am using the Winsock control with TCP/IP protocol and trying to send 29K file to a client. Not all the file gets there; only 5K. It is a graphics file and when opened, you can see it has become corrupted. I am using what I call the "burst" method of sending. I collect all the binary bits of the graphics file and send them at once. I've had success doing this with files of size 3K. Because of the larger size, do I need to send chunks instead of all at once? Do I need to set up a buffer to receive the data? I thought you can send files of any size with TCP? Any recommendations? Thank you.
Reply With Quote
  #2  
Old 06-26-2006, 07:52 PM
dilettante's Avatar
dilettanteLarge files and TCP dilettante is offline
Underclocked lifestyle

Forum Leader
* Guru *
 
Join Date: Feb 2005
Location: Michigan, USA
Posts: 4,520
Default

Yes, you can send large files. I've sent multimegabyte files just fine.

You can't just blast a bunch of bytes at the Winsock control and expect miracles though. About 16K at a blast seems close to optimal, but you have to drive the process by SendComplete events: blast a block, then when that send completes you blast out another.

No point at all in sucking the whole file into memory, read it a chunk at a time. That's why files have the ability to be read other than all at once.

Geeze.
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
Large files and TCP
Large files and TCP
Large files and TCP Large files and TCP
Large files and TCP
Large files and TCP
Large files and TCP Large files and TCP Large files and TCP Large files and TCP Large files and TCP Large files and TCP Large files and TCP
Large files and TCP
Large files and TCP
 
Large files and TCP
Large files and TCP
 
-->