-
Re: NWConnection batch receive
eskimo May 15, 2019 12:56 AM (in response to ds;lkfgjsd;lghjld;s)NWConnection
has abatch(_:)
method that calls the supplied closure and batches any send and receive calls you make within that closure. It’s pretty obvious how this works on the send side, but less so on the receive side. I don’t know if there’s an easy way to go from this semantics to the semantics you’re used to fromNWUDPSession
.Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardwarelet myEmail = "eskimo" + "1" + "@apple.com"
-
Re: NWConnection batch receive
ds;lkfgjsd;lghjld;s May 15, 2019 6:11 AM (in response to eskimo)Yes the batch thing seem helpful for send. Doesn't help us with receiveMessage. In fact the docs says it only works with send/receive.
> Calls other than send and receive will not be affected.
Does it even work with receiveMessage? If yes it should be explicitly mentioned.
-
Re: NWConnection batch receive
eskimo May 15, 2019 6:55 AM (in response to ds;lkfgjsd;lghjld;s)Does it even work with
receiveMessage(…)
?Even if it did, it’s hard to see how you’d assemble the semantics you want from the batch semantics provided.
I was curious about this issue so I had a quick chat with Network framework engineering about it. It seems that, as things currently stand, there isn’t a great way to achieve what you want. We’re hoping to improve that in the future but, for the moment, if
NWUDPSession
is working well for you, it’s fine to stick with that. It’s a very thin layer overNWConnection
(wellnw_connection_t
) anyway.Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardwarelet myEmail = "eskimo" + "1" + "@apple.com"
-
Re: NWConnection batch receive
ds;lkfgjsd;lghjld;s May 15, 2019 7:26 AM (in response to eskimo)NWUDPSession work fine in terms of performance. But statring with iOS 12.2 we run into unrecoverable code 55 errors
> The operation couldn’t be completed. No buffer space available (code 55)
Once that error is triggered, every read and write fail with the same error. I am trying to distill that into a minimal sample code to open a bug report, but maybe you are already familiar with that problem?
-
Re: NWConnection batch receive
eskimo May 16, 2019 12:18 AM (in response to ds;lkfgjsd;lghjld;s)But statring with iOS 12.2 we run into unrecoverable code 55 errors
Hmmm, that’s not good.
maybe you are already familiar with that problem?
No, I’ve not heard of that before. Did this break your shipping product? If so, you should file a bug about this even if you can’t reproduce it reliably. A bug report with a sysdiagnose log (per our Bug Reporting > Profiles and Logs) taken shortly after you see the problem is still going to be helpful.
If you do file a bug, please post the bug number, just for the record.
Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardwarelet myEmail = "eskimo" + "1" + "@apple.com"
-
Re: NWConnection batch receive
ds;lkfgjsd;lghjld;s May 16, 2019 1:02 PM (in response to eskimo)I filed a bug: 50864206
Thanks
-
-
-
-
-