Port.DidBecomeInvalidMessage
A message the system sends when a port becomes invalid.
Declaration
struct DidBecomeInvalidMessageOverview
A SocketPort object can’t detect when its connection to a remote port is lost, even if the remote port is on the same machine. Therefore, it can’t invalidate itself and post this message. Instead, your app needs to detect the timeout error when sending the next message.
The Port object sending this message is no longer useful, so all receivers should unregister themselves for any notifications involving the port. The handler that receives this message should check to see which port became invalid before attempting to do anything. In particular, observers that receive all DidBecomeInvalidMessage instances should be aware that the system handles communication with the window server through a Port. If this port becomes invalid, drawing operations cause a fatal error.
Observe this message with the identifier didBecomeInvalid, or specify its type directly to the addObserver(of:for:using:) method. The Subject of this message type is Port.
This message interoperates with the notification didBecomeInvalidNotification. The system notifies observers of the message when the NotificationCenter posts the notification. Similarly, the system notifies observers of the notification when it posts the message.