Say we have a TCP client that:
Sends data A, .defaultMessage, isComplete* = true
Sends data B, .finalMessage, isComplete* = true
(* I assume I have to say true here so it doesn't buffer, while on server isComplete is not true until end of stream; but even if I do isComplete = false here, it doesn't matter)
I would expect the server to:
Receive data A, ctx.isFinal = false, isComplete = false
Receive data B, ctx.isFinal = true, isComplete = true
or
Receive data A, ctx.isFinal = false, isComplete = false
Receive data B, ctx.isFinal = false, isComplete = false
Receive nil data, ctx.isFinal = true, isComplete = true
... or A and B split at any other boundary, of course.
The actuality is:
Receive data A, ctx.isFinal = true, isComplete = false
Receive data B, ctx.isFinal = true, isComplete = false
Receive nil data, ctx.isFinal = true, isComplete = true
Why is isFinal always true?
But okay, whatever, I can just rely on isComplete.
However, then I turn on TLS, and the result is:
Receive data A, ctx.isFinal = true, isComplete = false
Receive data B, ctx.isFinal = true, isComplete = false
... crickets ...
How am I supposed to know the client has EOF'd?
Does Network.framework not sent TLS close-notify?
I realize I can cancel() the entire connection on the client, and then I get isComplete = true, but I want to close just one half of the stream; the server still needs to send its response.
Code - https://developer.apple.com/forums/content/attachment/e2b353fd-dc15-4520-907c-6fea43e9c9af
Post
Replies
Boosts
Views
Activity
Toolbar appears (as a result of UIToolbar) but navigation bar does not.
Sample project:
hXXps://paste.jaka.io/2021-02-22/LaunchScreenTest.zip