Posts

Post marked as solved
3 Replies
1.2k Views
We're writing a Network.framework version of our peer-to-peer video streaming implementation, and are running into issues when the UDP message size becomes large enough to cause fragmentation. When this happens, it fails to reassemble with the following error:nw_protocol_ipv6_process_reassembly [C5.1:2] Failed to reassemble IPv6 Fragmentation ID 4293396248, dropping 1 framesThis happens both over en0 and awdl0. Any insights as to why this is happening would be greatly appreciated!
Posted Last updated
.
Post not yet marked as solved
2 Replies
771 Views
We're running a peer-to-peer video streaming app over Network.framework, with the frames going over a UDP connection. However I'm running into a very predictable lag occuring every 0.5s on the receiving side. In the minimal example below I'm sending a UDP packet 30 times per second, and here are the time deltas between the packets (in milliseconds) – the sending side consistent, the receiver side lagging: https://gist.github.com/PatrickPijnappel/9f413ad3b1a5bdff19bcc3d38f1921cdThe source for the minimal example to repoduce is in the gist below. Configured for iPad/iPhone but easy to adjust:https://gist.github.com/PatrickPijnappel/77e45cace7dc8f90b1c1075893c7444bThings I've tried:- Doesn't seem related to noise (moving to a noise free makes no difference).- Happens equally over router (en0) and peer-to-peer WiFi (awdl0).- Happens regardless of packet size.- A packet trace shows no signs of simultaneous traffic hogging bandwidthAny insights would be greatly appreciated!Tested on iOS 12.3.1 & iPhone XS & iPad Pro (A1673)
Posted Last updated
.
Post marked as solved
1 Replies
549 Views
We're using an NWListener to publish a Bonjour service, and within the same app allow browsing for that service (peer-to-peer). However, when browsing, this will cause the service of the current device also to be shown. I've considered a few approaches of addressing this:Checking the service name, but as I understand these could potentially collide (e.g. both just called "iPhone"). Since this name is also shown in the UI, we can't just change it to a UUID or the like.Putting an identifier in the TXT data. However, this requires resolving the service before it is available, and IIRC just resolving every service is consider bad practice (for performance reasons).Any suggestions would be appreciated.
Posted Last updated
.
Post marked as solved
3 Replies
2.2k Views
We're trying to establish a peer-to-peer UDP connection for video streaming, but are running into some issues. I can get it to work using the iOS 12 Network framework (which works very well) but need to support older versions of iOS as well.- As far as I can diagnose, it seems the problem is that a UDP connection doesn't keep the WiFi link active (i.e. `awdl0`). Does that diagnosis make sense and would the be any way to prevent this from happening?- Should using `MultipeerConnectivity` using `sendData(… with: .unreliable)` achieve comparable characteristics and performance to direct P2P UDP? As I understand MC uses UDP internally (though left as implementation detail) and just mimicks TCP over UDP for its ordered/reliable sending methods, is that correct?Any help would be greatly appreciated!
Posted Last updated
.