Completes any enqueued reads and writes, and then closes the write side of the underlying socket.
- iOS 9.0+
- macOS 10.11+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
You may continue to read data using the
read method after calling this method. Any calls to
write(_: after calling this method will result in an error.
Because the server may continue to write bytes to the client, it is recommended that you continue reading until the stream reaches end-of-file (EOF).