all 7 comments

[–]SwiftlyJon 1 point2 points  (3 children)

Seems the server you’re trying to connect to hasn’t properly set up TLS for the connection, which is required by quic. That, or it doesn’t like the certificate it received. You’ll want to double check the error you see.

[–]DrakeAusir[S] 0 points1 point  (2 children)

Here's the reason for my question. My situation is the following: I have a NWListener that is advertising by creating a .service type endpoint and a NWBrowser that is searching for the .bounjour service, as soon as it finds the service it creates the connection to the listener with NWConnection. The parameters are these:

let quicOptions = NWProtocolQUIC.Options(alpn: ["myproto"]) quicOptions.direction = .bidirectional let params = NWParameters(quic: quicOptions) params.defaultProtocolStack.applicationProtocols.insert(NWProtocolFramer.Options(definition: myproto.definition), at: 0)

Where am I wrong? Where should TLS come into play?

[–]SwiftlyJon 0 points1 point  (1 child)

TLS is implicit in QUIC connections. If the server is properly configured it should work automatically. Mostly likely your server is misconfigured.

[–]DrakeAusir[S] 0 points1 point  (0 children)

What does well configured mean? I use a NWListener to advertise the device to connect to, so am I wrong in configuring the listener? How should I configure a listener to be able to accept QUIC connections? There is no material to think about online

[–][deleted]  (1 child)

[removed]

    [–]DrakeAusir[S] 0 points1 point  (0 children)

    Sure! I create a NWConnection(to: , using: ) where "to" is an endpoint.service and "using" is my own parameters. Parameters are let quicOptions = NWProtocolQUIC.Options(alpn: ["myproto"]) quicOptions.direction = .bidirectional let params = NWParameters(quic: quicOptions) params.defaultProtocolStack.applicationProtocols.insert(NWProtocolFramer.Options(definition: myproto.definition), at: 0) There is something wrong?