no, you are right, unless compression is involved just chunk it
out.................
byte[] buffer = socket.GetSocketOption(SocketOptionLevel.Socket,
SocketOpionName.SendBuffer);
int bytes = 0;
using (FileStream fromStream = new FileStream("path", FileMode.Open,
FileAccess.Read, FileShare.Read, buffer.Length))
{
while(bytes = fromStream.Read(buffer, 0, buffer.Length) > 0)
{
socket.Write(buffer, 0, bytes);
}
}
"Jonathan Eggert via .NET 247" <an*******@dotnet247.com> wrote in message
news:uv**************@tk2msftngp13.phx.gbl...
Anyone know any component or samples on how to chunk a big file (approx 5MB
+)
on the sending and receiving side ? File could be an image or plain text. Is
it as simple as just looping through the stream on the sending side, sending
a byte array and appending to a file on the server side, or does it require
a much more complicted algorithm?
--------------------------------
From: Jonathan
-----------------------
Posted by a user from .NET 247 (
http://www.dotnet247.com/)
<Id>KqhQOzLKBUS4g3MRSZj3ew==</Id>