... | ... | @@ -472,17 +472,19 @@ Alternatively we could implement our own unicast protocol for fetching attribute |
|
|
|
|
|
### Local Service Discovery (LSD)
|
|
|
|
|
|
"Local Service Discovery (LSD) provides a SSDP-like (http over udp-multicast) mechanism to announce the presence in specific swarms to local neighbors. It can be used either as primary peer source for local transfers or to complement other sources which only operate on global unicast addresses." - [bep_0014](https://www.bittorrent.org/beps/bep_0014.html)
|
|
|
Local Service Discovery (LSD) is the protocol used by BitTorrent clients to discover peers on the local network.
|
|
|
It is a simple multicast-based protocol in which each peer periodically announces the infohashes of the torrents it is sharing.
|
|
|
|
|
|
#### Peer Advertisement
|
|
|
|
|
|
<https://www.bittorrent.org/beps/bep_0014.html#protocol>
|
|
|
|
|
|
The protocol could be further modified for this purpose by removing the infohash and (optional) cookie field. This comes at the effect of giving your application a more noticeable "fingerprint".
|
|
|
The protocol could be further modified for our purposes by removing the infohash and (optional) cookie field. This comes at the effect of giving the application a more noticeable "fingerprint".
|
|
|
|
|
|
#### Peer Discovery
|
|
|
|
|
|
To discover peers on the network, start a UdpClient at the specified addresses: A) 239.192.152.143:6771 (org-local) and B) [ff15::efc0:988f]:6771 (site-local)
|
|
|
Peer discovery is passive.
|
|
|
Peers are discovered by listening at the specified addresses: 239.192.152.143:6771 (IPv4 org-local) and [ff15::efc0:988f]:6771 (IPv6 site-local)
|
|
|
|
|
|
#### Peer Connectivity
|
|
|
|
... | ... | @@ -490,6 +492,10 @@ Once peers are discovered, a normal TCP connection can be made with the `HOST:PO |
|
|
|
|
|
#### Notes
|
|
|
|
|
|
Some devices (eg Huawei P8 Lite 2015 and 2017) don't receive LSD advertisements, even when the screen is turned on.
|
|
|
These devices can send LSD advertisements, and can send and receive NSD advertisements.
|
|
|
So NSD (implemented by the Android platform) appears to get some kind of special treatment compared to LSD (implemented by the application).
|
|
|
|
|
|
## Wi-Fi
|
|
|
|
|
|
### Wi-Fi Client
|
... | ... | |