Instance Method

getInputStream(_:outputStream:)

Creates a pair of input and output streams for the receiver and returns a Boolean value that indicates whether they were retrieved successfully.

Declaration

func getInputStream(_ inputStream: UnsafeMutablePointer<InputStream?>?, outputStream: UnsafeMutablePointer<OutputStream?>?) -> Bool

Parameters

inputStream

Upon return, the input stream for the receiver. Pass NULL if you do not need this stream.

outputStream

Upon return, the output stream for the receiver. Pass NULL if you do not need this stream.

Return Value

true if the streams are created successfully, otherwise false.

Discussion

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

See Also

Configuring Network Services

class func data(fromTXTRecord: [String : Data]) -> Data

Returns an NSData object representing a TXT record formed from a given dictionary.

class func dictionary(fromTXTRecord: Data) -> [String : Data]

Returns a dictionary representing a TXT record given as an NSData object.

var addresses: [Data]?

A read-only array containing NSData objects, each of which contains a socket address for the service.

var domain: String

A string containing the domain for this service.

var includesPeerToPeer: Bool

Specifies whether to also publish, resolve, or monitor this service over peer-to-peer Bluetooth and Wi-Fi, if available. false by default.

var name: String

A string containing the name of this service.

var type: String

The type of the published service.

func txtRecordData() -> Data?

Returns the TXT record for the receiver.

func setTXTRecord(Data?) -> Bool

Sets the TXT record for the receiver, and returns a Boolean value that indicates whether the operation was successful.

var delegate: NetServiceDelegate?

The delegate for the receiver.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software