Just to clarify - the original intent was to use this only between devices in the same LAN, because this way you don't need a server. Having a server, there are much better ways to transfer files.
I am a big fan of WebRTC. Even if I had a server I would try to use SCTP over DTLS. I have gotten better transfer rates. Not having to worry about HOL blocking and the overhead of TCP.