LAN File Transfering
BlitzMax Forums/BlitzMax Programming/LAN File Transfering
| ||
Hey. Could someone post some example code--using MaxGUI (progress bars)--of sending and receiving files on a LAN? I've been trying like crazy to do this and it is not working at all. If I read each byte from the file and send it, using ReadByte, it takes way longer than expected to send all of the bytes. If someone could help me with this it would be greatly appreciated. Thanks, |
| ||
I don't have any sample code for you and I currently don't even have a BlitzMax installation. But you should send chunks of bytes instead of single bytes. Try sending blocks of 1024 bytes or maybe even a bit more - it'll be MUCH faster than sending individual bytes over the net. |
| ||
Ok. I'll try that. Thanks, Winni! |
| ||
http://www.blitzbasic.com/Community/posts.php?topic=64842#723819 it works very well. |
| ||
OK, I am using Winni's method of sending chunks of 1024 bytes and the max speeds I'm getting are 10-11KB/s. Since this is over LAN only would it be safe to go ahead and boost the chunk size to maybe 0.5MB instead of 1KB? Is there a max block size I should worry about? |