I have a an application that incorporates a RTCP client to communicate with a local networked device. The device's RTCP implementation requires that the local RTCP port be 6970 even for the initial outbound connection. I have an implementation that is working just fine on macOS and iOS, but I when I port this to visionOS, I see that the local connection is ignoring my .requiredLocalEndpoint specification and choosing a random port (I can see this is happening in Wireshark via the VisionOS simulator.)
let remoteRtcpEndpoint = NWEndpoint.hostPort(host: NWEndpoint.Host(remoteRTCPAddress), port: NWEndpoint.Port(rawValue: remoteRTCPPort)!)
let rtcpParameters = NWParameters.udp
let localEndpoint = NWEndpoint.hostPort(host: NWEndpoint.Host("0.0.0.0"), port: NWEndpoint.Port(rawValue: localRTPPort)!)
Self.logger.info("Starting rtcp with local port \(localRTPPort), remote address \(remoteRTCPAddress), endpoint \(String(describing: localEndpoint))")
rtcpParameters.requiredLocalEndpoint = localEndpoint
rtcpParameters.allowLocalEndpointReuse = true
remoteRtcpConnection = NWConnection(to: remoteRtcpEndpoint, using: rtcpParameters)
remoteRtcpConnection.start(queue: .global())
And here's the code that sends the command.
remoteRtcpConnection.send(content: RtcpPacket.vdly(delayMs: HUGE_FIXED_VDLY_MS).packet(), completion: .contentProcessed({ error in
if let error = error {
Self.logger.warning("Error sending VDLY packet \(error)")
continuation.resume(throwing: error)
} else {
Self.logger.debug("VDLY Sent \(self.HUGE_FIXED_VDLY_MS)")
continuation.resume(returning: ())
}
}))
If this is a known limitation of the Network framework, should I revert to BSD sockets or something? How can I work around this? Additionally, I don't have a VisionOS device, so I am using the simulator, could this be a problem with the simulator's network bridge?
Post
Replies
Boosts
Views
Activity
I have a scroll view that scrolls horizontally and one of my users is asking that it respond to their scroll wheel without them having to use the shift key. Is there some way to do this natively? If not, how can I listen for the scroll wheel events in swiftUI and make my scroll wheel scroll to respond to them?
I am able to create a UIImage from webP data using UIImage(data: data) on iOS and iPadOS. When I try to do this same thing on watchOS 10, it fails. Is there a workaround to displaying webp images on watch os if this isn't expected to work?