I need to send and receive a large image between programs running on different machines within the same network.
I’ve looked at using upd. However, I ran into problems with the size of the packets and (after breaking the image into smaller pieces to get past this problem) the number of packets needing to be processed all at once – and ultimately packet loss.
I’ve also thought of sending the image by storing it in a common file folder and receiving it by using file watcher as a trigger. However, this just adds further complexities in setup where common folders don’t already exist.
Assuming I’m barking up the right tree looking at TCP, can someone point me to/provide an example of how to send an image file using it (VB.NET would be ideal). Also, are there practical limits to TCP package sizes?
If I am not barking up the right tree, and there is an easier way to do this I’d surely appreciate some guidance/examples.
Take a look at Socket.SendFile Method (MSDN).