Completes any enqueued reads and writes, and then closes the read side of the underlying socket.
- iOS 9.0+
- macOS 10.11+
- UIKit for Mac 13.0+Beta
- tvOS 9.0+
- watchOS 2.0+
You may continue to write data using the
write(_: method after calling this method. Any calls to
read after calling this method will result in an error.