A simple peer to peer C# application showing how to use my wrapper of the .NET asynchronous sockets. This app uses XML as a communication protocol to send messages and specify file details. The server listens on two ports: 5000 and 6000 where the latter is used solely for receiving binary file data. All text communication goes through the former via XML. Right now it only has TCP socket, but adding UDP in is trivial and does not change the interface in anyway.. I’ve tested this over GbE LAN and has observed a sustained transfer rates in excess of 70+MB/sec with consistent memory usage and minimal CPU utilization. The file being transferred was around 15GB in size. MD5 checksum was generated on the new file and has shown to be correct. So it’s very reliable, very efficient.
This also demonstrated the use of template method to wrap the .NET XMLReader/Writer to make it easier to use for different schemas.
I’ve spiced it up using a simple XAML template and a transition effect grabbed off code project. The
author deserves all the credit for such beautiful transitions.
Why share it here?
For years, I’ve benefited from the generosity of the large number of developers on code projects and various other platforms who have helped me horned my skills and through difficulties encountered during my working life. So I thought, now would be a good chance to give something back and hope it can benefit someone else.