[quote='877018022, vishalsehgal, /thread/815465?answerId=877018022#877018022, /profile/vishalsehgal'] We wanted to reduce the kernel overhead of assembling bytes that receiveMessage(completion:) does. [/quote] I have two things to note about this. First, there’s no guarantee that your network connections are being run by the kernel. Our platforms have a user-space networking stack and Network framework will choose that over the in-kernel stack in many common cases. Second, I’m concerned about this concept of “assembling bytes”. In general, UDP datagrams shouldn’t be fragmented and thus there’s no assembling of data at all. A packet arrives, it contains the full UDP datagram, and the content of that datagram is delivered to you. If you’re building something that does fragment UDP datagrams — that is, it sends datagrams that are larger than the path MTU and thus are subject to IP fragmentation — then it’d be better to work on not doing that rather than trying to worry about optimising this path. Moreov
Topic:
App & System Services
SubTopic:
Networking
Tags: