Share via


IMCNearbyServiceBrowserDelegate Interface

Definition

A delegate object that exposes peer-discovery events for a MCNearbyServiceBrowser object.

[Foundation.Protocol(Name="MCNearbyServiceBrowserDelegate", WrapperType=typeof(MultipeerConnectivity.MCNearbyServiceBrowserDelegateWrapper))]
[Foundation.ProtocolMember(IsProperty=false, IsRequired=true, IsStatic=false, Name="FoundPeer", ParameterByRef=new System.Boolean[] { false, false, false }, ParameterType=new System.Type[] { typeof(MultipeerConnectivity.MCNearbyServiceBrowser), typeof(MultipeerConnectivity.MCPeerID), typeof(Foundation.NSDictionary) }, Selector="browser:foundPeer:withDiscoveryInfo:")]
[Foundation.ProtocolMember(IsProperty=false, IsRequired=true, IsStatic=false, Name="LostPeer", ParameterByRef=new System.Boolean[] { false, false }, ParameterType=new System.Type[] { typeof(MultipeerConnectivity.MCNearbyServiceBrowser), typeof(MultipeerConnectivity.MCPeerID) }, Selector="browser:lostPeer:")]
[Foundation.ProtocolMember(IsProperty=false, IsRequired=false, IsStatic=false, Name="DidNotStartBrowsingForPeers", ParameterByRef=new System.Boolean[] { false, false }, ParameterType=new System.Type[] { typeof(MultipeerConnectivity.MCNearbyServiceBrowser), typeof(Foundation.NSError) }, Selector="browser:didNotStartBrowsingForPeers:")]
public interface IMCNearbyServiceBrowserDelegate : IDisposable, ObjCRuntime.INativeObject
[<Foundation.Protocol(Name="MCNearbyServiceBrowserDelegate", WrapperType=typeof(MultipeerConnectivity.MCNearbyServiceBrowserDelegateWrapper))>]
[<Foundation.ProtocolMember(IsProperty=false, IsRequired=true, IsStatic=false, Name="FoundPeer", ParameterByRef=new System.Boolean[] { false, false, false }, ParameterType=new System.Type[] { typeof(MultipeerConnectivity.MCNearbyServiceBrowser), typeof(MultipeerConnectivity.MCPeerID), typeof(Foundation.NSDictionary) }, Selector="browser:foundPeer:withDiscoveryInfo:")>]
[<Foundation.ProtocolMember(IsProperty=false, IsRequired=true, IsStatic=false, Name="LostPeer", ParameterByRef=new System.Boolean[] { false, false }, ParameterType=new System.Type[] { typeof(MultipeerConnectivity.MCNearbyServiceBrowser), typeof(MultipeerConnectivity.MCPeerID) }, Selector="browser:lostPeer:")>]
[<Foundation.ProtocolMember(IsProperty=false, IsRequired=false, IsStatic=false, Name="DidNotStartBrowsingForPeers", ParameterByRef=new System.Boolean[] { false, false }, ParameterType=new System.Type[] { typeof(MultipeerConnectivity.MCNearbyServiceBrowser), typeof(Foundation.NSError) }, Selector="browser:didNotStartBrowsingForPeers:")>]
type IMCNearbyServiceBrowserDelegate = interface
    interface INativeObject
    interface IDisposable
Derived
Attributes
Implements

Remarks

For a discussion of peer discovery and connection, see MCSession remarks.

Methods of MCNearbyServiceBrowserDelegate are typically called by the system on a background thread. Application developers who wish to modify the user interface must use, for instance, InvokeOnMainThread(Selector, NSObject).

Properties

Name Description
Handle

Handle (pointer) to the unmanaged object representation.

(Inherited from INativeObject)

Methods

Name Description
DidNotStartBrowsingForPeers(MCNearbyServiceBrowser, NSError)

Indicates that browsing for peers failed.

FoundPeer(MCNearbyServiceBrowser, MCPeerID, NSDictionary)

Indicates that a peer has been found.

LostPeer(MCNearbyServiceBrowser, MCPeerID)

Indicates that a peer has been lost.

Extension Methods

Name Description
DidNotStartBrowsingForPeers(IMCNearbyServiceBrowserDelegate, MCNearbyServiceBrowser, NSError)

Indicates that browsing for peers failed.

GetHandle(INativeObject)
GetNonNullHandle(INativeObject, String)

Applies to

See also