Platforms to show: All Mac Windows Linux Cross-Platform

NSNetServiceMBS.addresses as String()
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Networking MBS MacFrameworks Plugin 21.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Function: An array of addresses.
Notes: We take the raw addresses and decode IPv4 and IPv6 addresses for you.

Feedback, Comments & Corrections

NSNetServiceMBS.addressesIPv4 as String()
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Networking MBS MacFrameworks Plugin 21.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Function: An array of IPv4 addresses.
Notes: We take the raw addresses and decode only IPv4 addresses for you.

Feedback, Comments & Corrections

NSNetServiceMBS.addressesIPv6 as String()
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Networking MBS MacFrameworks Plugin 21.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Function: An array of IPv6 addresses.
Notes: We take the raw addresses and decode only IPv6 addresses for you.

Feedback, Comments & Corrections

NSNetServiceMBS.addressesRaw as MemoryBlock()
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Networking MBS MacFrameworks Plugin 21.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Function: A read-only array containing Memoryblock objects, each of which contains a socket address for the service.
Notes:
An array containing Memoryblock objects, each of which contains a socket address for the service. Each Memoryblock object in the returned array contains an appropriate sockaddr structure that you can use to connect to the socket. The exact type of this structure depends on the service to which you are connecting. If no addresses were resolved for the service, the returned array contains zero elements.
It is possible for a single service to resolve to more than one address or not resolve to any addresses. A service might resolve to multiple addresses if the computer publishing the service is currently multihoming.

Feedback, Comments & Corrections

NSNetServiceMBS.Constructor(Domain as String, Type as String, Name as String)
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Networking MBS MacFrameworks Plugin 21.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Function: Returns the receiver, initialized as a network service of a given type and sets the initial host information.
Notes:
domain: The domain for the service. To resolve in the default domains, pass in an empty string (""). To limit resolution to the local domain, use "local.".
If you are creating this object to resolve a service whose information your app stored previously, you should set this to the domain in which the service was originally discovered.
You can also use a NSNetServiceBrowserMBS object to obtain a list of possible domains in which you can discover and resolve services.
type: The network service type.
type must contain both the service type and transport layer information. To ensure that the mDNS responder searches for services, as opposed to hosts, prefix both the service name and transport layer name with an underscore character (“_”). For example, to search for an HTTP service on TCP, you would use the type string "_http._tcp.". Note that the period character at the end of the string, which indicates that the domain name is an absolute name, is required.
name: The name of the service to resolve.

Returns the receiver, initialized as a network service named name of type type in the domain domain.

This method is the appropriate initializer to use to resolve a service—to publish a service, use Constructor with port.
If you know the values for domain, type, and name of the service you wish to connect to, you can create an NSNetServiceMBS object using this initializer and call resolve on the result.

You cannot use this initializer to publish a service. This initializer passes an invalid port number to the designated initializer, which prevents the service from being registered. Calling publish on an NSNetService object initialized with this method generates a call to your didNotPublish event with an NSNetServicesBadArgumentError error.

See also:

Feedback, Comments & Corrections

NSNetServiceMBS.Constructor(Domain as String, Type as String, Name as String, Port as Integer)
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Networking MBS MacFrameworks Plugin 21.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Function: Initializes the receiver for publishing a network service of type type at the socket location specified by domain, name, and port.
Notes:
domain: The domain for the service. To use the default registration domains, pass in an empty string (""). To limit registration to the local domain, use "local.".
You can also use a NSNetServiceBrowser object to obtain a list of possible domains in which you can publish your service.
type: The network service type.
type must contain both the service type and transport layer information. To ensure that the mDNS responder searches for services, as opposed to hosts, prefix both the service name and transport layer name with an underscore character (“_”). For example, to search for an HTTP service on TCP, you would use the type string "_http._tcp.". Note that the period character at the end of the string, which indicates that the domain name is an absolute name, is required.
name: The name by which the service is identified to the network. The name must be unique. If you pass the empty string (""), the system automatically advertises your service using the computer name as the service name.
port: The port on which the service is published.
If you specify the NSNetServiceListenForConnections flag, you may pass zero (0), in which case the service automatically allocates an arbitrary (ephemeral) port for your service. When the DidPublish event is called, you can determine the actual port chosen by calling the service object’s NSNetServiceMBS method or accessing the corresponding property.
If your app is listening for connections on its own, the value of port must be a port number acquired by your application for the service.

You use this method to create a service that you wish to publish on the network. Although you can also use this method to create a service you wish to resolve on the network, it is generally more appropriate to use the Constructor method instead.

When publishing a service, you must provide valid arguments in order to advertise your service correctly. If the host computer has access to multiple registration domains, you must create separate NSNetServiceMBS objects for each domain. If you attempt to publish in a domain for which you do not have registration authority, your request may be denied.

It is acceptable to use an empty string for the domain argument when publishing or browsing a service, but do not rely on this for resolution.

This method is the designated initializer.

See also:

Feedback, Comments & Corrections

NSNetServiceMBS.Constructor(other as NSNetServiceMBS)
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Networking MBS MacFrameworks Plugin 21.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Function: Creates a new object to catch events.
Notes: You can subclass and fill in events. Then create a copy with this constructor to connect events.

See also:

Feedback, Comments & Corrections

NSNetServiceMBS.Destructor
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Networking MBS MacFrameworks Plugin 21.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Function: The destructor.

Feedback, Comments & Corrections

NSNetServiceMBS.getStreams(byref inputStream as NSInputStreamMBS, byref outputStream as NSOutputStreamMBS) as Boolean
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Networking MBS MacFrameworks Plugin 21.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Function: Creates a pair of input and output streams for the receiver and returns a Boolean value that indicates whether they were retrieved successfully.
Notes:
inputStream: Upon return, the input stream for the receiver.
outputStream: Upon return, the output stream for the receiver.

Returns yes if the streams are created successfully, otherwise false.

After this method is called, no events are called by the receiver.

Feedback, Comments & Corrections

NSNetServiceMBS.isEqual(other as NSNetServiceMBS) as Boolean
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Networking MBS MacFrameworks Plugin 21.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Function: Checks whether two services are same.
Notes: Returns true if equal or false if not.

Feedback, Comments & Corrections

NSNetServiceMBS.publish
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Networking MBS MacFrameworks Plugin 21.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Function: Attempts to advertise the receiver’s on the network.
Notes:
This method returns immediately, with success or failure indicated by the events.
This is equivalent to calling publish with the default options (0).

See also:

Some examples using this method:

Feedback, Comments & Corrections

NSNetServiceMBS.publish(options as Integer)
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Networking MBS MacFrameworks Plugin 21.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Function: Attempts to advertise the receiver on the network, with the given options.
Notes:
options: Options for the receiver. The supported options are described in constants.

This method returns immediately, with success or failure indicated by the events.

See also:

Feedback, Comments & Corrections

NSNetServiceMBS.resolve
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Networking MBS MacFrameworks Plugin 21.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Function: Starts a resolve process for the service.
Notes: Attempts to determine at least one address for the service. This method returns immediately, with success or failure indicated by the callbacks to the delegate.

See also:

Feedback, Comments & Corrections

NSNetServiceMBS.resolve(timeout as Double)
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Networking MBS MacFrameworks Plugin 21.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Function: Starts a resolve process of a finite duration for the service.
Notes:
timeout: The maximum number of seconds to attempt a resolve. A value of 0.0 indicates no timeout and a resolve process of indefinite duration.

During the resolve period, the service sends DidResolveAddress event for each address it discovers that matches the service parameters. Once the timeout is hit, the service sends DidStop event. If no addresses resolve during the timeout period, the service sends didNotResolve event.

See also:

Feedback, Comments & Corrections

NSNetServiceMBS.setTXTRecordData(Data as MemoryBlock) as Boolean
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Networking MBS MacFrameworks Plugin 21.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Function: Sets the TXT record for the receiver, and returns a Boolean value that indicates whether the operation was successful.
Notes:
Data: The TXT record for the receiver.

True if recordData is successfully set as the TXT record, otherwise false.

Feedback, Comments & Corrections

NSNetServiceMBS.startMonitoring
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Networking MBS MacFrameworks Plugin 21.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Function: Starts the monitoring of TXT-record updates for the receiver.
Notes: Please implement didUpdateTXTRecordData event, which is called when the TXT record for the receiver is updated.

Feedback, Comments & Corrections

NSNetServiceMBS.stop
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Networking MBS MacFrameworks Plugin 21.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Function: Halts a currently running attempt to publish or resolve a service.
Notes:
We raise DidStop event after the service stops.
It is safe to remove all strong references to the service immediately after calling stop.

Feedback, Comments & Corrections

NSNetServiceMBS.stopMonitoring
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Networking MBS MacFrameworks Plugin 21.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Function: Stops the monitoring of TXT-record updates for the receiver.

Feedback, Comments & Corrections

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

The biggest plugin in space...




Links
MBS Xojo PDF Plugins

Start Chat