I'm implementing custom protocol using NWListener and NWProtocolFramerImplementation
with transport options using
same for TCP with appropriate options.
how should we can get transport options(UDP|TCP) from framer when receiving data in parseInput ?
Because implementations for TCP and UDP can be different.
I am not touching protocol stacking intentionally as this is whole another topic.
with transport options using
Code Block let parameters = NWParameters(dtls: nil, udp: NWProtocolUDP.Options()) parameters.defaultProtocolStack.applicationProtocols = [NWProtocolFramer.Options(definition: CustomProtocol.definition)] let listener = try NWListener(using: parameters, on: port)
same for TCP with appropriate options.
how should we can get transport options(UDP|TCP) from framer when receiving data in parseInput ?
Because implementations for TCP and UDP can be different.
I am not touching protocol stacking intentionally as this is whole another topic.