Contents

connection(_:didReceive:)

Sent as a connection loads data incrementally.

Declaration

optional func connection(_ connection: NSURLConnection, didReceive data: Data)

Parameters

  • connection:

    The connection sending the message.

  • data:

    The newly available data. The delegate should concatenate the contents of each data object delivered to build up the complete data for a URL load.

Discussion

This method provides the only way for an asynchronous delegate to retrieve the loaded data. It is the responsibility of the delegate to retain or copy this data as it is delivered.

See Also

Handling Incoming Data