Read a certain number of bytes on a connection
On This Page
func readLength(_ length: Int, completionHandler completion: @escaping (Data?, Error?) -> Void)
The exact number of bytes the caller wants to read.
The completion handler to be invoked when data has been read or an error occurred.
Read length number of bytes. See readMinimumLength:maximumLength:completionHandler: for a complete discussion of the callback behavior.
func readMinimumLength(Int, maximumLength: Int, completionHandler: (Data?, Error?) -> Void)
Read the requested range of bytes
func write(Data, completionHandler: (Error?) -> Void)
Write the data to the connection.
Close the connection for writing
This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.