Newbie Socket Question
-
Hi, I'm building an app that has to send large amounts of binary data - 700Mb and up to a remote copy of this app. The format of the data doesn't really matter as long as the method is fast, efficiant, and fairly easy to use outside .NET like in Java reimplementationas. I've looked at
Socket.Send(Byte[], Int32, Int32, SocketFlags)
, but I'm not sure that putting a 700Mb buffer into that function would be such a good idea!? Is it necessary to split the thing up? can .NET help me with this so I don't have to reinvent the wheel? Or is there a better way of sending/downloading data altogether? Any answers would be much appreciated.***¨¨`) ¸¸.·´ ¸.·*¨¨`) (¸¸.·* ¸ .·* ¸¸.·* (¸¸.~~> Joel Holdsworth.
**
-
Hi, I'm building an app that has to send large amounts of binary data - 700Mb and up to a remote copy of this app. The format of the data doesn't really matter as long as the method is fast, efficiant, and fairly easy to use outside .NET like in Java reimplementationas. I've looked at
Socket.Send(Byte[], Int32, Int32, SocketFlags)
, but I'm not sure that putting a 700Mb buffer into that function would be such a good idea!? Is it necessary to split the thing up? can .NET help me with this so I don't have to reinvent the wheel? Or is there a better way of sending/downloading data altogether? Any answers would be much appreciated.***¨¨`) ¸¸.·´ ¸.·*¨¨`) (¸¸.·* ¸ .·* ¸¸.·* (¸¸.~~> Joel Holdsworth.
**
Joel, You will definitely want to break it into chunks, and, with that much data, you will probably want to put some error-recovery around it to restart the download if something bad happens. I suggest include some sort of identifier (ie filename) and the chunk number with each chunk. Chunking also allows the remote app to display some sort of progress bar as the data comes across, which tends to be pretty useful.