Nearby Connections 2.0: When is simultaneous advertising/discovery possible?

十年热恋 提交于 2020-01-13 06:18:18

问题


I'm currently trying to simultaneously advertise and discover using the P2P_CLUSTER strategy. I believe that this should work, since the available documentation says the P2P_CLUSTER strategy supports M-N connection topology (where each device can both initiate outgoing connections to M other devices and accept incoming connections from N other devices). However, the same documentation also says that it's possible to simultaneously advertise and discover using the P2P_STAR strategy. So simultaneous advertising/discovery would seem to be possible with all strategies? But I wonder about this, because I also read the following note on a different documentation page:

Note: depending on the Strategy, it's possible to advertise and discover at the same time on a device.

So does the ability to simultaneously advertise and discover depend on the Strategy? and if so, how?


回答1:


Right now, all strategies can advertise + discover at the same time. There was a time (pre-release) when that wasn't true, and the wording was left that way in case we ever added a new strategy that can't do both.

That said, the note is confusing given the current state of things. I'll get someone to remove it.



来源:https://stackoverflow.com/questions/46534103/nearby-connections-2-0-when-is-simultaneous-advertising-discovery-possible

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!