Available service types in WifiP2pDnsSdServiceInfo.newInstance

前端 未结 1 1821
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-06 17:35

I\'m programming an android application that uses Wifi Direct. I\'m trying to start my service and I\'m calling WifiP2pDnsSdServiceInfo.newInstance. However, I have been sea

1条回答
  •  天涯浪人
    2021-01-06 18:35

    Android documentation provides some info to start with in the guide Using Network Service Discovery. According it the service type specifies which protocol and transport layer the application uses. The syntax is _._. So you should only use existing transports in the second part. Most commonly used are tcp and udp, of course.

    As for the first part, there is a bunch of application level protocols. For example, presence is a messaging protocol from xmpp.org, and ipp is a printer service. You can find more or less complete list of the registered protocols at the dns-sd.org site. Also you may have a look at the service names registry at iana.org.

    As the DNS-based Service Discovery is a part of Zero-configuration networking which has numerous implementations, additional lists of protocols can be found on specific vendors sites. For example, here is the list of Apple's Bonjour service types.

    I don't think there exists a single exhaustive list of protocols used worldwide. Nevertheless, I suppose you could invent your own name with a reasonably distiguishable underlying structure (acronyms and/or semantics) - just search through the Internet and make sure your name does not appear in relation to Zeroconf and DNS-SD.

    0 讨论(0)
提交回复
热议问题