MonobjcMonobjc Documented Class Library
NSPortDidBecomeInvalidNotification Field
NamespacesMonobjc.FoundationNSPortNSPortDidBecomeInvalidNotification

Posted from the invalidate method, which is invoked when the NSPort is deallocated or when it notices that its communication channel has been damaged. The notification object is the NSPort object that has become invalid. This notification does not contain a userInfo dictionary.

An NSSocketPort object cannot detect when its connection to a remote port is lost, even if the remote port is on the same machine. Therefore, it cannot invalidate itself and post this notification. Instead, you must detect the timeout error when the next message is sent.

The NSPort object posting this notification is no longer useful, so all receivers should unregister themselves for any notifications involving the NSPort. A method receiving this notification should check to see which port became invalid before attempting to do anything. In particular, observers that receive all NSPortDidBecomeInvalidNotification messages should be aware that communication with the window server is handled through an NSPort. If this port becomes invalid, drawing operations will cause a fatal error.

Available in Mac OS X v10.0 and later.

Declaration Syntax
C#Visual BasicVisual C++
public static readonly NSString NSPortDidBecomeInvalidNotification
Public Shared ReadOnly NSPortDidBecomeInvalidNotification As NSString
public:
static initonly NSString^ NSPortDidBecomeInvalidNotification
Version Information
  • Available in Monobjc Bridge: 10.6 (For Mac OS X 10.6 and later), 10.5 (For Mac OS X 10.5 and later)

Assembly: Monobjc.Foundation (Module: Monobjc.Foundation)