|
-
Oct 27th, 2006, 10:51 PM
#1
Re: Filemanager problem
Also, a 4KB packet size is kind of big. Remember that, no matter how big you set your packet size, only so much data can get through at one time. This is limited by Windows (TCP/IP) settings and network interface drivers. A large packet size will not make the transfer go any faster. I would set it at about 512 bytes or 1KB at most. Packet size will not really determine the rate of download (KBPS) unless you set it extremely low, and even then it will have minimal effect.
It also looks like you're sending/receiving files using strings to hold the data.
Use a byte array. If the file you're sending is a binary file, you will want to use a byte array to store/write the data to disk.
You could change your parsing routine to work with a byte array, or alternatively, use 2 ports. One for sending the file info, the other for transferring the file data.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|