Posts

Post not yet marked as solved
0 Replies
840 Views
I am receiving the ETIMEDOUT when reading an InputStream (swift) after 60 seconds in a polling mode on a serial dispatch queueStream.getStreamsToHost(withName: self.address, port: self.port, inputStream: &input, outputStream: &output) /// .... /// in an input stream extension self.open() let read = buffer.withUnsafeMutableBytes { self.read($0.advanced(by: validBufferBytes), maxLength: bufferSize) }Now, I'm puzzled, as no documentation hints that this timeout will happen. It states that the call should block until there are bytes available.Also, I have searched high and low and it seems that I can't control this particular timeout.I have gone as far as querying the SO_RECVTIMEO socket option, but it looks like it's set to 0 as it should by default, meaning no timeout.What's happening? Can you please point to some authoritative information source on the actual behavior and ways to control it?
Posted Last updated
.