Return to site

Peer To Peer For Mac Os X

broken image


When you upgrade to macOS Catalina, you get more of everything you love about Mac. Experience dedicated apps for music, TV, and podcasts. Smart new features in the apps you use every day. And Sidecar, which lets you use iPad as a second Mac display. Best of all, upgrading is free and easy.

Chances are, your Mac can run macOS Catalina.

Voice over Peer to Peer (Voptop) offers great system stability by using decentralised control structures in a peer to peer network. Voice over Peer to Peer (Voptop) is free of cost in all its functionality for private users. Voice over Peer to Peer (Voptop) is 'open source', released under its own open source license. PeerBlock by PeerBlock, LLC is an easy-to-use application that will block the advertising or spyware servers that may try to get unauthorized access to your computer. Unfortunately, there is no version of PeerBlock for Mac, but here you can find relevant substitutes with similar features and capabilities.

Mac computers with Metal-capable graphics processors (GPUs) can upgrade to macOS Catalina.

Make sure you're ready to upgrade.

Before you upgrade, we recommend that you back up your Mac. Then, if your Mac is running OS X Mavericks 10.9 or later, you can upgrade directly to macOS Catalina.

Upgrading is free. And easier than you think.

Upgrading from macOS Mojave?

Go to Software Update in System Preferences to find the macOS Catalina upgrade. Click Upgrade Now and follow the onscreen instructions to begin your upgrade. If you don't have broadband access, you can upgrade your Mac at any Apple Store.

Upgrading from an older version of macOS?

If you're running High Sierra (10.13), Sierra (10.12), or El Capitan (10.11), upgrade to macOS Catalina from the App Store. If you're running Lion (10.7) or Mountain Lion (10.8), you will need to upgrade to El Capitan (10.11) first. If you don't have broadband access, you can upgrade your Mac at any Apple Store.

  • OS X 10.9 or later
  • 4GB of memory
  • 12.5GB of available storage (OS X El Capitan 10.11.5 or later)*
  • Some features require an Apple ID; terms apply.
  • Some features require a compatible internet service provider; fees may apply.

For details about your Mac model, click the Apple icon at the top left of your screen and choose About This Mac. These Mac models are compatible with macOS Catalina:

  • MacBook (Early 2015 or newer)
  • MacBook Air (Mid 2012 or newer)
  • MacBook Pro (Mid 2012 or newer)
  • Mac mini (Late 2012 or newer)
  • iMac (Late 2012 or newer)
  • iMac Pro (2017)
  • Mac Pro (Late 2013 or newer)
Mac

Siri

Requires a broadband internet connection and microphone (built-in or external). Quicktime player download for mac.

Hey Siri

Supported by the following Mac models:

  • MacBook Pro (2018 or newer)
  • MacBook Air (2018 or newer)
  • iMac Pro

Dictation, Voice Control, and Voice Memos

Requires a microphone (built-in or external).

Spotlight Suggestions

Requires a broadband internet connection.

Gestures

Requires a Multi-Touch trackpad, Force Touch trackpad, Magic Trackpad, or Magic Mouse.

Force Touch gestures require a Force Touch trackpad.

Peer To Peer For Mac Os X

VoiceOver gestures require a Multi-Touch trackpad, Force Touch trackpad, or Magic Trackpad.

Photo Booth

Requires a FaceTime or iSight camera (built-in or external), or USB video class (UVC) camera.

FaceTime

Audio calls require a microphone (built-in or external) and broadband internet connection.

Video calls require a built-in FaceTime camera, an iSight camera (built-in or external), or a USB video class (UVC) camera; and broadband internet connection.

Apple TV

High Dynamic Range (HDR) video playback is supported by the following Mac models:

  • MacBook Pro (2018 or newer)
  • iMac Pro (2017)
  • Mac Pro (2019) with Pro Display XDR

Dolby Atmos soundtrack playback is supported by the following Mac models:

  • MacBook Air (2018 or newer)
  • MacBook Pro (2018 or newer)

Sidecar

Supported by the following Mac models:

  • MacBook (2016 or newer)
  • MacBook Air (2018 or newer)
  • MacBook Pro (2016 or newer)
  • Mac mini (2018 or newer)
  • iMac (late 2015 or newer)
  • iMac Pro (2017 or newer)
  • Mac Pro (2019)

Supported by all iPad models with Apple Pencil support:

  • 12.9-inch iPad Pro
  • 11-inch iPad Pro
  • 10.5-inch iPad Pro
  • 9.7-inch iPad Pro
  • iPad (6th generation or later)
  • iPad mini (5th generation)
  • iPad Air (3rd generation)

Continuity Camera

Requires an iPhone or iPad with a Lightning connector and iOS 12 or later.

Continuity Sketch and Continuity Markup

Requires an iPhone with iOS 13 or an iPad with iPadOS.

Handoff

Requires an iPhone or iPad with a Lightning connector and iOS 8 or later.

Instant Hotspot

Requires an iPhone or iPad with cellular connectivity, a Lightning connector, and iOS 8.1 or later. Requires Personal Hotspot service through your carrier.

Universal Clipboard

Requires an iPhone or iPad with a Lightning connector and iOS 10 or later.

Auto Unlock

Supported by Mac models introduced in mid 2013 or later.

Requires an Apple Watch with watchOS 3 or later or an iPhone 5 or later.

Approve with Apple Watch

Supported by Mac models introduced in mid 2013 or later.

Requires an Apple Watch with watchOS 6 or later or an iPhone 6s or later with iOS 13.

Apple Pay on the Web

Requires MacBook Pro with Touch Bar, an iPhone 6 or later with iOS 10 or later, or an Apple Watch with watchOS 3 or later.

Phone Calling

Requires an iPhone with iOS 8 or later and an activated carrier plan.

SMS

Requires an iPhone with iOS 8.1 or later and an activated carrier plan.

Home

Requires an iPhone with iOS 12 or later and a configured Home app.

AirDrop

AirDrop to iOS and iPadOS devices requires an iPhone or iPad with a Lightning connector and iOS 7 or later.

AirPlay

AirPlay Mirroring requires an Apple TV (2nd generation or later).

Peer
Peer

AirPlay for web video requires an Apple TV (2nd generation or later).

Peer-to-peer AirPlay requires a Mac (2012 or later) and an Apple TV (3rd generation rev A, model A1469 or later) with Apple TV software 7.0 or later.

Time Machine

Requires an external storage device (sold separately).

Power Nap

Supported by the following Mac models:

  • MacBook (Early 2015 or newer)
  • MacBook Air (Mid 2012 or newer)
  • MacBook Pro with Retina display (Mid 2012 or newer)
  • Mac mini (Late 2012 or newer)
  • iMac (Late 2012 or newer)
  • iMac Pro (2017)
  • Mac Pro (Late 2013 or newer)

Boot Camp

Allows Boot Camp installations of Windows 10 on supported Mac models.

Exchange Support

Requires Microsoft Office 365, Exchange 2016, Exchange 2013, or Exchange Server 2010. Installing the latest Service Packs is recommended.

Windows Migration

Supports OS X 10.7 or later and Windows 7 or later.

App Store

Available only to persons age 13 or older in the U.S. and many other countries and regions.

  • Apple Books
  • Apple News
  • App Store
  • Automator
  • Calculator
  • Calendar
  • Chess
  • Contacts
  • Dictionary
  • DVD Player
  • FaceTime
  • Find My
  • Font Book
  • Home
  • Image Capture
  • Launchpad
  • Mail
  • Maps
  • Messages
  • Mission Control
  • Music
  • Notes
  • Photo Booth
  • Photos
  • Podcasts
  • Preview
  • QuickTime Player
  • Reminders
  • Safari
  • Siri
  • Stickies
  • Stocks
  • System Preferences
  • TextEdit
  • Time Machine
  • TV
  • Voice Memos
  • Activity Monitor
  • AirPort Utility
  • Audio MIDI Setup
  • Bluetooth File Exchange
  • Boot Camp Assistant
  • ColorSync Utility
  • Console
  • Digital Color Meter
  • Disk Utility
  • Grapher
  • Keychain Access
  • Migration Assistant
  • Screenshot
  • Screen Time
  • Script Editor
  • Sidecar
  • System Information
  • Terminal
  • VoiceOver Utility
  • Arabic
  • Catalan
  • Croatian
  • Simplified Chinese
  • Traditional Chinese
  • Traditional Chinese (Hong Kong)
  • Czech
  • Danish
  • Dutch
  • English (Australia)
  • English (UK)
  • English (U.S.)
  • Finnish
  • French
  • French (Canada)
  • German
  • Greek
  • Hebrew
  • Hindi
  • Hungarian
  • Indonesian
  • Italian
  • Japanese
  • Korean
  • Malay
  • Norwegian
  • Polish
  • Brazilian Portuguese
  • Portuguese
  • Romanian
  • Russian
  • Slovak
  • Spanish
  • Spanish (Latin America)
  • Swedish
  • Thai
  • Turkish
  • Ukrainian
  • Vietnamese

Wifi dongle for macbook pro. OS X and iOS provide four APIs for discovering and advertising network services:

  • NSNetService—A high-level Objective-C API suitable for most app developers.

  • CFNetService—A high-level C API suitable for use in Core Foundation code.

  • DNS Service Discovery—A low-level C API suitable for cross-platform code. This API also offers more flexibility than the higher-level APIs.

  • Game Kit framework—A high-level Objective-C API that provides peer-to-peer communication support for games, both locally (using infrastructure Wi-Fi and Bluetooth) and globally over the Internet.

In addition to these APIs, the Multipeer Connectivity Framework provides support for discovering and communicating with instances of your app and related apps on nearby devices using infrastructure Wi-Fi, peer-to-peer Wi-Fi, and either Bluetooth (for iOS) or Ethernet (for OS X).

As a rule, you should use Game Kit only for game-related peer-to-peer networking. For other peer-to-peer networking between iOS devices running iOS 7 and later, you should consider using the Multipeer Connectivity framework.

For compatibility with older versions of iOS, you can also write your own networking code and use CFNetService or NSNetService to advertise its availability.

Note: On devices that support Bluetooth, Bluetooth communication is automatically used by Game Kit. (Bonjour over Bluetooth can also be enabled when using the DNS Service Discovery C API by setting the interfaceIndex to kDNSServiceFlagsIncludeP2P. See Bonjour over Bluetooth on iOS 5 and Later for details.)

Bonjour Service Overview

A Bonjour service advertisement consists of three parts:

  • Service name—This name must be unique to a particular instance of your program running on a particular computer.

  • Service type—This must be the same for all instances of your program, and should be registered with the Internet Assigned Numbers Authority (IANA).

  • Domain—If the domain value is empty, the host chooses the appropriate domains in which to publish or browse.

When an app browses for Bonjour services, it asks for services matching a particular type in a particular domain, and it gets back a list of matching service names. It should then present an appropriate UI to the user. When the user tells the app to connect to a particular service, the app should then connect to the service using a connect-to-service API. (If this is not possible for some reason, the app can pass the service's hostname and port to a connect-by-name API or, if a connect-by-name API is not available, the app can ask Bonjour to resolve the hostname, and the app can then connect by IP address and port number.)

Publishing a Network Service

Bonjour zero-configuration networking lets you advertise network services, such as a printer or a document syncing service, on a network. There are three ways to publish a network service:

  • For Objective-C and Core Foundation code, the recommended way is with the CFNetServices API.

  • For portable C code that must run on operating systems other than iOS and OS X, the DNS Service Discovery C API is recommended.

You can publish a network service with the following steps:

Peer To Peer For Mac Os X El Capitan

  1. Create a socket to listen for connections to the service. See Writing a TCP-Based Server in Networking Programming Topics for the recommended way to listen for connections on a network socket.

  2. Create a service object, providing the port of your socket, the domain (usually an empty string), and the service type string of your choosing:

    • With Foundation, initialize an NSNetService object with the initWithDomain:type:name:port: method.

    • With Core Foundation, create a CFNetServiceRef object with the CFNetServiceCreate function.

    • With the DNS Service Discovery API, call DNSServiceRegister to return a DNSServiceRef object.

  3. Assign a delegate or callback:

    • With Foundation, assign a delegate to the NSNetService object with the delegate method.

    • With Core Foundation, assign a client callback to the CFNetServiceRef object with the CFNetServiceSetClient function.

    • With the DNS Service Discovery API, you should pass a client callback (and, optionally, a pointer to a context object of your choosing) in your call to DNSServiceRegister. At this point, you are done except for handling callbacks when they occur.

  4. Schedule or reschedule the service, if necessary:

    • With Foundation, the service is automatically scheduled on the current run loop in the default mode. If you need to schedule the object on another run loop or in a different mode, you should unschedule it and reschedule it at this point.

    • With Core Foundation, you must schedule the CFNetServicesRef object on a run loop by calling CFNetServiceScheduleWithRunLoop.

    • With the DNS Service Discovery API, call DNSServiceSetDispatchQueue to schedule the service on a dispatch queue. (If you must support an OS prior to OS X v10.7, see the SRVResolver sample code project for an example of how to use DNS Service Discovery without Grand Central Dispatch.)

  5. Publish the service, if necessary:

    • With Foundation, publish the service by calling the publish method.

    • With Core Foundation, publish the service by calling CFNetServiceRegisterWithOptions.

    • With the DNS Service Discovery API, no further action is necessary; the service was already published when you called DNSServiceRegister.

      This could be the work of adware (and its friends), a sneaky variant of malware that is hard to find, and harder to remove. Malwarebytes AdwCleaner employs innovative technology engineered solely to detect and remove these unwanted hitchhikers. It's the cleaner of choice for home users and technicians. Adware cleaner for mac. Adware Cleaner will help find and remove adware from your Mac. Is your Mac running slow? Annoying adware, like pop-ups, or malware could be the problem. Adware Cleaner scans for and removes code that degrades system performance or attacks your system. Malwarebytes 4 takes out malware, adware, spyware, and other threats before they can infect your machine and ruin your day. It'll keep you safe online and your Mac running like it should. Rating: 4.80 620 Reviews FREE DOWNLOAD SEE PRICING.

After your service is published, you can listen for connections on your socket and set up input and output streams when a connection is made.

Important: If you create a custom protocol, you should use a custom service type, and register that service type with IANA. For details, see RFC 6335.

Browsing for and Connecting to a Network Service

The process for finding and resolving a network service is as simple as the process for publishing one. To browse for network services in Objective-C, create an instance of the NSNetServiceBrowser class and assign it a delegate. Then, call the searchForServicesOfType:inDomain: method on the service browser. The netServiceBrowser:didFindService:moreComing: delegate method is called once for every service found.

To connect to a service, first stop the browsing by calling stop (unless you have a specific reason to keep browsing), then call the getInputStream:outputStream: method on the NSNetService object that represents the service. The address of the service is resolved automatically.

You can also use the CFStreamCreatePairWithSocketToNetService function with a CFNetServiceRef object to connect to a Bonjour service.

Important: If you are using ARC, you should read NSNetService and Automatic Reference Counting (ARC).

Resolving a Network Service

You may need to resolve a network service manually to provide the service's address to an API that does not accept network service names. To resolve a network service in Objective-C, first stop the browsing by calling stop (unless you have a specific reason to keep browsing), then call the resolveWithTimeout: method on the NSNetService object that represents the service.

The netServiceDidResolveAddress: method is called on the service's delegate when the service's address has been resolved. You can then access the service's hostname with the hostName method or its address information with the addresses method. To avoid unnecessary network traffic, you should also call stop on the NSNetService object as soon as it returns a set of addresses.

Important: The resolution process returns both numerical IP addresses and a hostname. The IP addresses can be an arbitrary mix of IPv4 and IPv6 addresses. Unless you are doing something unusual, you should normally pass the hostname to any API that supports hostnames rather than using the IP addresses directly, because otherwise you would otherwise have to write your own code to try connecting to each of the multiple IP addresses in parallel or in series (described further in Avoid Resolving DNS Names Before Connecting to a Host).

The resolver caches the mapping from hostname to IP addresses, so future lookups do not result in any additional network traffic.

Multipeer Connectivity Overview

The Multipeer Connectivity Framework provides a layer on top of Bonjour that lets you communicate with apps running on nearby devices (over infrastructure Wi-Fi, peer-to-peer Wi-Fi, and either Bluetooth (for iOS) or Ethernet (for OS X) without having to write lots of networking code specific to your app.

With Multipeer Connectivity, your app advertises its availability. It can then discover other instances of your app (or other apps that share the same service type) running on nearby devices, and can invite those nearby peers to join a session. If they accept the invitation, your app can send messages and files to one or more of the connected peers with just a single method call.

Important: As with Bonjour, your app must provide a service type, and you should register that service type with IANA. For details, see RFC 6335.

If you need stream-based communication, your app can open a unidirectional stream to any connected peer (which can also open a unidirectional stream back to your app in response).

Finally, Multipeer Connectivity provides the ability to share small amounts of data (such as the user's screen name) outside the context of a session, if desired, allowing you to provide the user with information that they can use when choosing peers to invite into a session.

To Learn More

Multipeer Connectivity—Read Multipeer Connectivity Framework Reference and the MultipeerGroupChat sample code project.

Peer To Peer For Mac Os X 10.13

Game Kit—Read Game Center Programming Guide, Game Kit Framework Reference, and the GKRocket and GKTank sample code projects.

Peer To Peer For Mac Os X 10.10

Peer

Siri

Requires a broadband internet connection and microphone (built-in or external). Quicktime player download for mac.

Hey Siri

Supported by the following Mac models:

  • MacBook Pro (2018 or newer)
  • MacBook Air (2018 or newer)
  • iMac Pro

Dictation, Voice Control, and Voice Memos

Requires a microphone (built-in or external).

Spotlight Suggestions

Requires a broadband internet connection.

Gestures

Requires a Multi-Touch trackpad, Force Touch trackpad, Magic Trackpad, or Magic Mouse.

Force Touch gestures require a Force Touch trackpad.

Peer To Peer For Mac Os X

VoiceOver gestures require a Multi-Touch trackpad, Force Touch trackpad, or Magic Trackpad.

Photo Booth

Requires a FaceTime or iSight camera (built-in or external), or USB video class (UVC) camera.

FaceTime

Audio calls require a microphone (built-in or external) and broadband internet connection.

Video calls require a built-in FaceTime camera, an iSight camera (built-in or external), or a USB video class (UVC) camera; and broadband internet connection.

Apple TV

High Dynamic Range (HDR) video playback is supported by the following Mac models:

  • MacBook Pro (2018 or newer)
  • iMac Pro (2017)
  • Mac Pro (2019) with Pro Display XDR

Dolby Atmos soundtrack playback is supported by the following Mac models:

  • MacBook Air (2018 or newer)
  • MacBook Pro (2018 or newer)

Sidecar

Supported by the following Mac models:

  • MacBook (2016 or newer)
  • MacBook Air (2018 or newer)
  • MacBook Pro (2016 or newer)
  • Mac mini (2018 or newer)
  • iMac (late 2015 or newer)
  • iMac Pro (2017 or newer)
  • Mac Pro (2019)

Supported by all iPad models with Apple Pencil support:

  • 12.9-inch iPad Pro
  • 11-inch iPad Pro
  • 10.5-inch iPad Pro
  • 9.7-inch iPad Pro
  • iPad (6th generation or later)
  • iPad mini (5th generation)
  • iPad Air (3rd generation)

Continuity Camera

Requires an iPhone or iPad with a Lightning connector and iOS 12 or later.

Continuity Sketch and Continuity Markup

Requires an iPhone with iOS 13 or an iPad with iPadOS.

Handoff

Requires an iPhone or iPad with a Lightning connector and iOS 8 or later.

Instant Hotspot

Requires an iPhone or iPad with cellular connectivity, a Lightning connector, and iOS 8.1 or later. Requires Personal Hotspot service through your carrier.

Universal Clipboard

Requires an iPhone or iPad with a Lightning connector and iOS 10 or later.

Auto Unlock

Supported by Mac models introduced in mid 2013 or later.

Requires an Apple Watch with watchOS 3 or later or an iPhone 5 or later.

Approve with Apple Watch

Supported by Mac models introduced in mid 2013 or later.

Requires an Apple Watch with watchOS 6 or later or an iPhone 6s or later with iOS 13.

Apple Pay on the Web

Requires MacBook Pro with Touch Bar, an iPhone 6 or later with iOS 10 or later, or an Apple Watch with watchOS 3 or later.

Phone Calling

Requires an iPhone with iOS 8 or later and an activated carrier plan.

SMS

Requires an iPhone with iOS 8.1 or later and an activated carrier plan.

Home

Requires an iPhone with iOS 12 or later and a configured Home app.

AirDrop

AirDrop to iOS and iPadOS devices requires an iPhone or iPad with a Lightning connector and iOS 7 or later.

AirPlay

AirPlay Mirroring requires an Apple TV (2nd generation or later).

AirPlay for web video requires an Apple TV (2nd generation or later).

Peer-to-peer AirPlay requires a Mac (2012 or later) and an Apple TV (3rd generation rev A, model A1469 or later) with Apple TV software 7.0 or later.

Time Machine

Requires an external storage device (sold separately).

Power Nap

Supported by the following Mac models:

  • MacBook (Early 2015 or newer)
  • MacBook Air (Mid 2012 or newer)
  • MacBook Pro with Retina display (Mid 2012 or newer)
  • Mac mini (Late 2012 or newer)
  • iMac (Late 2012 or newer)
  • iMac Pro (2017)
  • Mac Pro (Late 2013 or newer)

Boot Camp

Allows Boot Camp installations of Windows 10 on supported Mac models.

Exchange Support

Requires Microsoft Office 365, Exchange 2016, Exchange 2013, or Exchange Server 2010. Installing the latest Service Packs is recommended.

Windows Migration

Supports OS X 10.7 or later and Windows 7 or later.

App Store

Available only to persons age 13 or older in the U.S. and many other countries and regions.

  • Apple Books
  • Apple News
  • App Store
  • Automator
  • Calculator
  • Calendar
  • Chess
  • Contacts
  • Dictionary
  • DVD Player
  • FaceTime
  • Find My
  • Font Book
  • Home
  • Image Capture
  • Launchpad
  • Mail
  • Maps
  • Messages
  • Mission Control
  • Music
  • Notes
  • Photo Booth
  • Photos
  • Podcasts
  • Preview
  • QuickTime Player
  • Reminders
  • Safari
  • Siri
  • Stickies
  • Stocks
  • System Preferences
  • TextEdit
  • Time Machine
  • TV
  • Voice Memos
  • Activity Monitor
  • AirPort Utility
  • Audio MIDI Setup
  • Bluetooth File Exchange
  • Boot Camp Assistant
  • ColorSync Utility
  • Console
  • Digital Color Meter
  • Disk Utility
  • Grapher
  • Keychain Access
  • Migration Assistant
  • Screenshot
  • Screen Time
  • Script Editor
  • Sidecar
  • System Information
  • Terminal
  • VoiceOver Utility
  • Arabic
  • Catalan
  • Croatian
  • Simplified Chinese
  • Traditional Chinese
  • Traditional Chinese (Hong Kong)
  • Czech
  • Danish
  • Dutch
  • English (Australia)
  • English (UK)
  • English (U.S.)
  • Finnish
  • French
  • French (Canada)
  • German
  • Greek
  • Hebrew
  • Hindi
  • Hungarian
  • Indonesian
  • Italian
  • Japanese
  • Korean
  • Malay
  • Norwegian
  • Polish
  • Brazilian Portuguese
  • Portuguese
  • Romanian
  • Russian
  • Slovak
  • Spanish
  • Spanish (Latin America)
  • Swedish
  • Thai
  • Turkish
  • Ukrainian
  • Vietnamese

Wifi dongle for macbook pro. OS X and iOS provide four APIs for discovering and advertising network services:

  • NSNetService—A high-level Objective-C API suitable for most app developers.

  • CFNetService—A high-level C API suitable for use in Core Foundation code.

  • DNS Service Discovery—A low-level C API suitable for cross-platform code. This API also offers more flexibility than the higher-level APIs.

  • Game Kit framework—A high-level Objective-C API that provides peer-to-peer communication support for games, both locally (using infrastructure Wi-Fi and Bluetooth) and globally over the Internet.

In addition to these APIs, the Multipeer Connectivity Framework provides support for discovering and communicating with instances of your app and related apps on nearby devices using infrastructure Wi-Fi, peer-to-peer Wi-Fi, and either Bluetooth (for iOS) or Ethernet (for OS X).

As a rule, you should use Game Kit only for game-related peer-to-peer networking. For other peer-to-peer networking between iOS devices running iOS 7 and later, you should consider using the Multipeer Connectivity framework.

For compatibility with older versions of iOS, you can also write your own networking code and use CFNetService or NSNetService to advertise its availability.

Note: On devices that support Bluetooth, Bluetooth communication is automatically used by Game Kit. (Bonjour over Bluetooth can also be enabled when using the DNS Service Discovery C API by setting the interfaceIndex to kDNSServiceFlagsIncludeP2P. See Bonjour over Bluetooth on iOS 5 and Later for details.)

Bonjour Service Overview

A Bonjour service advertisement consists of three parts:

  • Service name—This name must be unique to a particular instance of your program running on a particular computer.

  • Service type—This must be the same for all instances of your program, and should be registered with the Internet Assigned Numbers Authority (IANA).

  • Domain—If the domain value is empty, the host chooses the appropriate domains in which to publish or browse.

When an app browses for Bonjour services, it asks for services matching a particular type in a particular domain, and it gets back a list of matching service names. It should then present an appropriate UI to the user. When the user tells the app to connect to a particular service, the app should then connect to the service using a connect-to-service API. (If this is not possible for some reason, the app can pass the service's hostname and port to a connect-by-name API or, if a connect-by-name API is not available, the app can ask Bonjour to resolve the hostname, and the app can then connect by IP address and port number.)

Publishing a Network Service

Bonjour zero-configuration networking lets you advertise network services, such as a printer or a document syncing service, on a network. There are three ways to publish a network service:

  • For Objective-C and Core Foundation code, the recommended way is with the CFNetServices API.

  • For portable C code that must run on operating systems other than iOS and OS X, the DNS Service Discovery C API is recommended.

You can publish a network service with the following steps:

Peer To Peer For Mac Os X El Capitan

  1. Create a socket to listen for connections to the service. See Writing a TCP-Based Server in Networking Programming Topics for the recommended way to listen for connections on a network socket.

  2. Create a service object, providing the port of your socket, the domain (usually an empty string), and the service type string of your choosing:

    • With Foundation, initialize an NSNetService object with the initWithDomain:type:name:port: method.

    • With Core Foundation, create a CFNetServiceRef object with the CFNetServiceCreate function.

    • With the DNS Service Discovery API, call DNSServiceRegister to return a DNSServiceRef object.

  3. Assign a delegate or callback:

    • With Foundation, assign a delegate to the NSNetService object with the delegate method.

    • With Core Foundation, assign a client callback to the CFNetServiceRef object with the CFNetServiceSetClient function.

    • With the DNS Service Discovery API, you should pass a client callback (and, optionally, a pointer to a context object of your choosing) in your call to DNSServiceRegister. At this point, you are done except for handling callbacks when they occur.

  4. Schedule or reschedule the service, if necessary:

    • With Foundation, the service is automatically scheduled on the current run loop in the default mode. If you need to schedule the object on another run loop or in a different mode, you should unschedule it and reschedule it at this point.

    • With Core Foundation, you must schedule the CFNetServicesRef object on a run loop by calling CFNetServiceScheduleWithRunLoop.

    • With the DNS Service Discovery API, call DNSServiceSetDispatchQueue to schedule the service on a dispatch queue. (If you must support an OS prior to OS X v10.7, see the SRVResolver sample code project for an example of how to use DNS Service Discovery without Grand Central Dispatch.)

  5. Publish the service, if necessary:

    • With Foundation, publish the service by calling the publish method.

    • With Core Foundation, publish the service by calling CFNetServiceRegisterWithOptions.

    • With the DNS Service Discovery API, no further action is necessary; the service was already published when you called DNSServiceRegister.

      This could be the work of adware (and its friends), a sneaky variant of malware that is hard to find, and harder to remove. Malwarebytes AdwCleaner employs innovative technology engineered solely to detect and remove these unwanted hitchhikers. It's the cleaner of choice for home users and technicians. Adware cleaner for mac. Adware Cleaner will help find and remove adware from your Mac. Is your Mac running slow? Annoying adware, like pop-ups, or malware could be the problem. Adware Cleaner scans for and removes code that degrades system performance or attacks your system. Malwarebytes 4 takes out malware, adware, spyware, and other threats before they can infect your machine and ruin your day. It'll keep you safe online and your Mac running like it should. Rating: 4.80 620 Reviews FREE DOWNLOAD SEE PRICING.

After your service is published, you can listen for connections on your socket and set up input and output streams when a connection is made.

Important: If you create a custom protocol, you should use a custom service type, and register that service type with IANA. For details, see RFC 6335.

Browsing for and Connecting to a Network Service

The process for finding and resolving a network service is as simple as the process for publishing one. To browse for network services in Objective-C, create an instance of the NSNetServiceBrowser class and assign it a delegate. Then, call the searchForServicesOfType:inDomain: method on the service browser. The netServiceBrowser:didFindService:moreComing: delegate method is called once for every service found.

To connect to a service, first stop the browsing by calling stop (unless you have a specific reason to keep browsing), then call the getInputStream:outputStream: method on the NSNetService object that represents the service. The address of the service is resolved automatically.

You can also use the CFStreamCreatePairWithSocketToNetService function with a CFNetServiceRef object to connect to a Bonjour service.

Important: If you are using ARC, you should read NSNetService and Automatic Reference Counting (ARC).

Resolving a Network Service

You may need to resolve a network service manually to provide the service's address to an API that does not accept network service names. To resolve a network service in Objective-C, first stop the browsing by calling stop (unless you have a specific reason to keep browsing), then call the resolveWithTimeout: method on the NSNetService object that represents the service.

The netServiceDidResolveAddress: method is called on the service's delegate when the service's address has been resolved. You can then access the service's hostname with the hostName method or its address information with the addresses method. To avoid unnecessary network traffic, you should also call stop on the NSNetService object as soon as it returns a set of addresses.

Important: The resolution process returns both numerical IP addresses and a hostname. The IP addresses can be an arbitrary mix of IPv4 and IPv6 addresses. Unless you are doing something unusual, you should normally pass the hostname to any API that supports hostnames rather than using the IP addresses directly, because otherwise you would otherwise have to write your own code to try connecting to each of the multiple IP addresses in parallel or in series (described further in Avoid Resolving DNS Names Before Connecting to a Host).

The resolver caches the mapping from hostname to IP addresses, so future lookups do not result in any additional network traffic.

Multipeer Connectivity Overview

The Multipeer Connectivity Framework provides a layer on top of Bonjour that lets you communicate with apps running on nearby devices (over infrastructure Wi-Fi, peer-to-peer Wi-Fi, and either Bluetooth (for iOS) or Ethernet (for OS X) without having to write lots of networking code specific to your app.

With Multipeer Connectivity, your app advertises its availability. It can then discover other instances of your app (or other apps that share the same service type) running on nearby devices, and can invite those nearby peers to join a session. If they accept the invitation, your app can send messages and files to one or more of the connected peers with just a single method call.

Important: As with Bonjour, your app must provide a service type, and you should register that service type with IANA. For details, see RFC 6335.

If you need stream-based communication, your app can open a unidirectional stream to any connected peer (which can also open a unidirectional stream back to your app in response).

Finally, Multipeer Connectivity provides the ability to share small amounts of data (such as the user's screen name) outside the context of a session, if desired, allowing you to provide the user with information that they can use when choosing peers to invite into a session.

To Learn More

Multipeer Connectivity—Read Multipeer Connectivity Framework Reference and the MultipeerGroupChat sample code project.

Peer To Peer For Mac Os X 10.13

Game Kit—Read Game Center Programming Guide, Game Kit Framework Reference, and the GKRocket and GKTank sample code projects.

Peer To Peer For Mac Os X 10.10

NSNetService—Read NSNetServices and CFNetServices Programming Guide, NSNetServiceBrowser Class Reference, NSNetServiceBrowserDelegate Protocol Reference, and NSNetServiceDelegate Protocol Reference. For sample code, see the RemoteCurrency sample code project.

CFNetService—Read NSNetServices and CFNetServices Programming Guide and CFNetServices Reference.

DNS Service Discovery—Read DNS Service Discovery Programming Guide and DNS Service Discovery C Reference.


Peer To Peer For Mac Os X 10.7


Peer To Peer Mac Os X

Copyright © 2004, 2017 Apple Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2017-03-27





broken image