0

I need a way for my application to find someone with the same application on a local network.

But can't find the docs to use a protocol like SSPD. It says its UDP on port 1900 and the ip 239.255.255.250.

It also says it can use NOTIFY and M-SEARCH.

But that is it. I've hit a wall. And I need some guidence.

OVERVIEW

Trying to make my apps automatically find each other and exchange ip/names on a local network so they can talk to each other p2p-style without a connection broker.

4

1 回答 1

2

UPnP 设备架构参考包含事实上的 SSDP 参考:它与 IETF 规范非常相似,并且已经有几十个经过良好测试的实现。第 1 章包含实现 SSDP 所需的一切,假设您知道如何发送和接收多播和单播 UDP 消息。

我对实施 SSDP 的建议:不要. 它可能看起来很简单,但在路上有很多陷阱。查找为您执行 SSDP 的库或服务。如果您使用的是 linux,我建议您使用 GSSDP(参考代码)(但我在研究它时有点偏颇)。我会假设其他平台也有类似的库。

于 2015-09-07T08:44:21.880 回答