Hallo,
I have one or two questions to sockets on iOS.
I have to work with UDP and TCP sockets on iOS.
What API oder Framework would you suggest me to solve this problem?
Working with low-level BSD sockets? Use a high-level framework? Which one (there are a lot)?
Use special OS classes with more support? I don't know what is the best thing for my issue.
My requirements for the socket issue:
- TCP and UDP needed
- NO_DELAY support needed
- TCP socket with long-term-connection (not only a few seconds)
- To use the sockets in Swift (if possible)
One more hit from me:
Currently, I worked with NWConnection and DispatchQueue API.
I liked this classes until now. But I find no solution for NO_DELAY issue here (which worked).
let tcp = NWProtocolTCP.Options.init()
tcp.noDelay = true
let params = NWParameters.init(tls: nil, tcp: tcp)
connection = NWConnection(to: NWEndpoint.hostPort(host: ipAddress, port: TcpSocket.PORT), using: params)
That was my test to set the NO_DELAY flag for the TCP socket. Is that right?
Would be fine and great to here from you.
Thanks a lot!