Package apple.foundation.protocol
Interface NSNetServiceDelegate
-
public interface NSNetServiceDelegate
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default voidnetServiceDidAcceptConnectionWithInputStreamOutputStream(NSNetService sender, NSInputStream inputStream, NSOutputStream outputStream)Sent to a published NSNetService instance's delegate when a new connection is * received.default voidnetServiceDidNotPublish(NSNetService sender, NSDictionary<java.lang.String,? extends NSNumber> errorDict)Sent to the NSNetService instance's delegate when an error in publishing the instance occurs.default voidnetServiceDidNotResolve(NSNetService sender, NSDictionary<java.lang.String,? extends NSNumber> errorDict)Sent to the NSNetService instance's delegate when an error in resolving the instance occurs.default voidnetServiceDidPublish(NSNetService sender)Sent to the NSNetService instance's delegate when the publication of the instance is complete and successful.default voidnetServiceDidResolveAddress(NSNetService sender)Sent to the NSNetService instance's delegate when one or more addresses have been resolved for an NSNetService instance.default voidnetServiceDidStop(NSNetService sender)Sent to the NSNetService instance's delegate when the instance's previously running publication or resolution request has stopped.default voidnetServiceDidUpdateTXTRecordData(NSNetService sender, NSData data)Sent to the NSNetService instance's delegate when the instance is being monitored and the instance's TXT record has been updated.default voidnetServiceWillPublish(NSNetService sender)Sent to the NSNetService instance's delegate prior to advertising the service on the network.default voidnetServiceWillResolve(NSNetService sender)Sent to the NSNetService instance's delegate prior to resolving a service on the network.
-
-
-
Method Detail
-
netServiceDidAcceptConnectionWithInputStreamOutputStream
default void netServiceDidAcceptConnectionWithInputStreamOutputStream(NSNetService sender, NSInputStream inputStream, NSOutputStream outputStream)
Sent to a published NSNetService instance's delegate when a new connection is * received. Before you can communicate with the connecting client, you must -open * and schedule the streams. To reject a connection, just -open both streams and * then immediately -close them. * To enable TLS on the stream, set the various TLS settings using * kCFStreamPropertySSLSettings before calling -open. You must also specify * kCFBooleanTrue for kCFStreamSSLIsServer in the settings dictionary along with * a valid SecIdentityRef as the first entry of kCFStreamSSLCertificates.
-
netServiceDidNotPublish
default void netServiceDidNotPublish(NSNetService sender, NSDictionary<java.lang.String,? extends NSNumber> errorDict)
Sent to the NSNetService instance's delegate when an error in publishing the instance occurs. The error dictionary will contain two key/value pairs representing the error domain and code (see the NSNetServicesError enumeration above for error code constants). It is possible for an error to occur after a successful publication.
-
netServiceDidNotResolve
default void netServiceDidNotResolve(NSNetService sender, NSDictionary<java.lang.String,? extends NSNumber> errorDict)
Sent to the NSNetService instance's delegate when an error in resolving the instance occurs. The error dictionary will contain two key/value pairs representing the error domain and code (see the NSNetServicesError enumeration above for error code constants).
-
netServiceDidUpdateTXTRecordData
default void netServiceDidUpdateTXTRecordData(NSNetService sender, NSData data)
Sent to the NSNetService instance's delegate when the instance is being monitored and the instance's TXT record has been updated. The new record is contained in the data parameter.
-
netServiceDidPublish
default void netServiceDidPublish(NSNetService sender)
Sent to the NSNetService instance's delegate when the publication of the instance is complete and successful.
-
netServiceDidResolveAddress
default void netServiceDidResolveAddress(NSNetService sender)
Sent to the NSNetService instance's delegate when one or more addresses have been resolved for an NSNetService instance. Some NSNetService methods will return different results before and after a successful resolution. An NSNetService instance may get resolved more than once; truly robust clients may wish to resolve again after an error, or to resolve more than once.
-
netServiceDidStop
default void netServiceDidStop(NSNetService sender)
Sent to the NSNetService instance's delegate when the instance's previously running publication or resolution request has stopped.
-
netServiceWillPublish
default void netServiceWillPublish(NSNetService sender)
Sent to the NSNetService instance's delegate prior to advertising the service on the network. If for some reason the service cannot be published, the delegate will not receive this message, and an error will be delivered to the delegate via the delegate's -netService:didNotPublish: method.
-
netServiceWillResolve
default void netServiceWillResolve(NSNetService sender)
Sent to the NSNetService instance's delegate prior to resolving a service on the network. If for some reason the resolution cannot occur, the delegate will not receive this message, and an error will be delivered to the delegate via the delegate's -netService:didNotResolve: method.
-
-