Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSNetServiceMBS class.

NSNetServiceMBS.DidAcceptConnection(InputStream as NSInputStreamMBS, outputStream as NSOutputStreamMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Networking MBS MacFrameworks Plugin 21.1 ✅ Yes ❌ No ❌ No ✅ Yes
Called when a client connects to a service managed by Bonjour.

inputStream: A stream object for receiving data from the client.
outputStream: A stream object for sending data to the client.

When you publish a service, if you set the NSNetServiceListenForConnections flag in the service options, the service object accepts connections on behalf of your app. Later, when a client connects to that service, the service object calls this method to provide the app with a pair of streams for communicating with that client.

NSNetServiceMBS.DidNotPublish(Error as Dictionary)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Networking MBS MacFrameworks Plugin 21.1 ✅ Yes ❌ No ❌ No ✅ Yes
Notifies the delegate that a service could not be published.

error: A dictionary containing information about the problem. The dictionary contains the keys NSNetServicesErrorCode and NSNetServicesErrorDomain.

This method may be called long after a WillPublish event has been delivered.

Some examples using this event:

NSNetServiceMBS.DidNotResolve(Error as Dictionary)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Networking MBS MacFrameworks Plugin 21.1 ✅ Yes ❌ No ❌ No ✅ Yes
Informs that an error occurred during resolution of a given service.

error: A dictionary containing information about the problem. The dictionary contains the keys NSNetServicesErrorCode and NSNetServicesErrorDomain.

Clients may try to resolve again upon receiving this error. For example, a DNS rotary may yield different IP addresses on different resolution requests. A common error condition is that no addresses were resolved during the timeout period specified in resolve.

Some examples using this event:

NSNetServiceMBS.DidPublish

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Networking MBS MacFrameworks Plugin 21.1 ✅ Yes ❌ No ❌ No ✅ Yes
Notifies you that a service was successfully published.

Some examples using this event:

NSNetServiceMBS.DidResolveAddress

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Networking MBS MacFrameworks Plugin 21.1 ✅ Yes ❌ No ❌ No ✅ Yes
Informs you that the address for a given service was resolved.

The delegate can use the addresses method to retrieve the service’s address. If the delegate needs only one address, it can stop the resolution process using stop. Otherwise, the resolution will continue until the timeout specified in resolve is reached.

Some examples using this event:

NSNetServiceMBS.DidStop

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Networking MBS MacFrameworks Plugin 21.1 ✅ Yes ❌ No ❌ No ✅ Yes
Informs you that a publish or resolveWithTimeout: request was stopped.

Some examples using this event:

NSNetServiceMBS.DidUpdateTXTRecordData(data as MemoryBlock)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Networking MBS MacFrameworks Plugin 21.1 ✅ Yes ❌ No ❌ No ✅ Yes
Notifies the delegate that the TXT record for a given service has been updated.

data: The new TXT record.

Some examples using this event:

NSNetServiceMBS.WillPublish

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Networking MBS MacFrameworks Plugin 21.1 ✅ Yes ❌ No ❌ No ✅ Yes
Notifies you that the network is ready to publish the service.

Publication of the service proceeds asynchronously and may still generate a call to the didNotPublish event if an error occurs.

Some examples using this event:

NSNetServiceMBS.WillResolve

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Networking MBS MacFrameworks Plugin 21.1 ✅ Yes ❌ No ❌ No ✅ Yes
Notifies you that the network is ready to resolve the service.

Resolution of the service proceeds asynchronously and may still generate a call to the didNotResolve event if an error occurs.

Some examples using this event:

The items on this page are in the following plugins: MBS MacFrameworks Plugin.


The biggest plugin in space...