Hi everyone,
I'm currently working on establishing connections using either IPv4 or IPv6 in my Swift application. However, I've hit a snag with NWProtocolIP.Options. It appears that I'm unable to create its instance to configure additional options.
I would appreciate any tips or advice on how to achieve IPv4 or IPv6 connections exclusively. Here's a breakdown of what I'm aiming to accomplish in my app:
Initialize the protocol options and offer choices for IP versions and various other transport layer options.
Initialize the endpoint by passing the IP address struct and port number.
Create the connection object using the endpoint and parameters. If IPv4 was selected as the option and the IP address struct contained an IPv6 address, I expect the NWConnection to fail, providing the corresponding error code.
Any insights or guidance on resolving this issue would be highly appreciated.
Thank you in advance for your help!
Topic:
App & System Services
SubTopic:
Networking
Tags: