Package apple.foundation.protocol
Interface NSNetServiceDelegate
-
public interface NSNetServiceDelegateAPI-Since: 2.0
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default voidnetServiceDidAcceptConnectionWithInputStreamOutputStream(@NotNull NSNetService sender, @NotNull NSInputStream inputStream, @NotNull NSOutputStream outputStream)Sent to a published NSNetService instance's delegate when a new connection is * received.default voidnetServiceDidNotPublish(@NotNull NSNetService sender, @NotNull NSDictionary<java.lang.String,? extends NSNumber> errorDict)Sent to the NSNetService instance's delegate when an error in publishing the instance occurs.default voidnetServiceDidNotResolve(@NotNull NSNetService sender, @NotNull NSDictionary<java.lang.String,? extends NSNumber> errorDict)Sent to the NSNetService instance's delegate when an error in resolving the instance occurs.default voidnetServiceDidPublish(@NotNull NSNetService sender)Sent to the NSNetService instance's delegate when the publication of the instance is complete and successful.default voidnetServiceDidResolveAddress(@NotNull NSNetService sender)Sent to the NSNetService instance's delegate when one or more addresses have been resolved for an NSNetService instance.default voidnetServiceDidStop(@NotNull NSNetService sender)Sent to the NSNetService instance's delegate when the instance's previously running publication or resolution request has stopped.default voidnetServiceDidUpdateTXTRecordData(@NotNull NSNetService sender, @NotNull 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(@NotNull NSNetService sender)Sent to the NSNetService instance's delegate prior to advertising the service on the network.default voidnetServiceWillResolve(@NotNull NSNetService sender)Sent to the NSNetService instance's delegate prior to resolving a service on the network.
-
-
-
Method Detail
-
netServiceDidAcceptConnectionWithInputStreamOutputStream
default void netServiceDidAcceptConnectionWithInputStreamOutputStream(@NotNull @NotNull NSNetService sender, @NotNull @NotNull NSInputStream inputStream, @NotNull @NotNull 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. API-Since: 7.0
-
netServiceDidNotPublish
default void netServiceDidNotPublish(@NotNull @NotNull NSNetService sender, @NotNull @NotNull 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(@NotNull @NotNull NSNetService sender, @NotNull @NotNull 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(@NotNull @NotNull NSNetService sender, @NotNull @NotNull 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(@NotNull @NotNull NSNetService sender)Sent to the NSNetService instance's delegate when the publication of the instance is complete and successful.
-
netServiceDidResolveAddress
default void netServiceDidResolveAddress(@NotNull @NotNull 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(@NotNull @NotNull 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(@NotNull @NotNull 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(@NotNull @NotNull 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.
-
-