Want to play with Bonjour services? `NSNetService` and `NetServiceBrowser` are the guys to help.
Apple has a nice documentation here, which is based on `Objective-C`, and I am trying to come up with a Swift implementation on how to browse services.

1. Create a Utility class which conforms to NetServiceBrowserDelegate

2. Create function to search for the services

// Method to start searching for services
func startSearching(){

self.netServiceBrowser.searchForServices(ofType: self.type, inDomain: self.domain)

3. Implement the delegate methods

netServiceBrowserWillSearch :- Calls when search starts
netServiceBrowserDidStopSearch :- Calls when search stopped
didNotSearch :- Couldn’t search some error occurred
didFindService :- Calls when a service is found
didRemoveService :- Calls when a service gets removed

Here is the full code BonjourServiceDiscovery

// Via terminal
Start a sample service :- dns-sd -R Mysite _http._tcp local 80

Browse service :- dns-sd -B _http._tcp local (dns-sd -B Type Domain )