Contents

connection:shouldMakeNewConnection:

Returns a Boolean value that indicates whether the parent connection should allow a given new connection to be created.

Declaration

- (BOOL) connection:(NSConnection *) ancestor shouldMakeNewConnection:(NSConnection *) conn;

Parameters

  • ancestor:

    The connection object for which the receiver is the delegate.

  • conn:

    The new connection.

Return Value

true if ancestor should allow conn to be created and set up, false if ancestor should refuse and immediately release conn.

Discussion

Use this method to limit the amount of NSConnection objects created in your application or to change the parameters of child NSConnection objects.

Use NSConnectionDidInitializeNotification instead of this delegate method if possible.

See Also

Responding to a Connection