Contents

FileHandle.ReadCompletionMessage

A message a file handle sends when it reads the data currently available in a file or a communication channel.

Declaration

struct ReadCompletionMessage

Overview

Before adding an observer for this message type, call either readInBackgroundAndNotify() or readInBackgroundAndNotify(forModes:) on an appropriate FileHandle object.

Observe this message with the identifier readCompletion, or specify its type directly to the addObserver(of:for:using:) method. The Subject of this message type is FileHandle.

This message interoperates with the notification readCompletionNotification. 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.

Topics

Creating a message

Working with message properties

See Also

Working with notification messages