3 ms·
It shouldn't be an issue, but it actually is. There is the exact same problem in bittorrent space: there's a BEP (extension) for discovering peers using Zerocon
by rakoo 11y ago
It shouldn't be an issue, but it actually is. There is the exact same problem in bittorrent space: there's a BEP (extension) for discovering peers using Zeroconf (BEP 0026, as can be read in [1]) and "Local Peer Discovery" that doesn't even have a BEP.
The Zeroconf way is kind of cumbersome, especially if you don't have an easy way to do the whole mDNS and DNS-SD. And since Windows doesn't have a native way to do this (you need to use the Apple SDK) and it seems most bittorrent users are Windows users, nobody seriously bothered with that.
LPD on the other hand is the simplest thing you can ever think about (https://forum.utorrent.com/topic/54306-local-peer-discovery-documentation/ https://forum.utorrent.com/topic/54306-local-peer-discovery-...):
> in short: join the multicast group 239.192.152.143:6771 and listen for SSDP messages. Every 5 minutes, announce yourself to the multicast group by sending this message:
> snprintf(msg, 200,
"BT-SEARCH * HTTP/1.1\r\n"
"Host: 239.192.152.143:6771\r\n"
"Port: %d\r\n"
"Infohash: %s\r\n"
"\r\n\r\n", listen_port, ih_hex);
I'll agree with you that if everyone talked Zeroconf it would be great, but the truth is, it's far too heavy and difficult compared to the alternative of polling a simple UDP socket, which pretty much any language can do easily.
[1] http://bittorrent.org/beps/bep_0026.html http://bittorrent.org/beps/bep_0026.html