Creates a new dispatch source object for reading bytes from the specified file.
- iOS 8.0+
- macOS 10.10+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
- Xcode 8.0+
A file descriptor pointing to an open file or socket. The dispatch source begins reading at the file descriptor's current location.
The dispatch queue to which to execute the installed handlers.
A dispatch source object that conforms to the
After creating the dispatch source, use the methods of the
Dispatch protocol to install the event handlers you need. The returned dispatch source is in the inactive state initially. When you are ready to begin processing events, call its
As the system reads the contents of the file or socket, it calls your event handler to process the bytes.