I believe this could by a bug in network.framework.
So i've set up simple UDP syslog server using NWListener:
and it works as intended reveiving every UDP message with isComplete flag true in handleInput when framer.parseInput is called.
But if i prepend additional protocol
to the protocol stack which simply forwards the message to downstream protocol without any data manipulation
the downstream protocol receives isComplete false.
So the question is this a bug or what should be done to preserve isComplete flag ?
So i've set up simple UDP syslog server using NWListener:
Code Block parameters.defaultProtocolStack.applicationProtocols = [NWProtocolFramer.Options(definition: SyslogProtocol.definition)]
and it works as intended reveiving every UDP message with isComplete flag true in handleInput when framer.parseInput is called.
But if i prepend additional protocol
Code Block parameters.defaultProtocolStack.applicationProtocols.insert(NWProtocolFramer.Options(definition: ValueLengthProtocol.definition), at: 0)
to the protocol stack which simply forwards the message to downstream protocol without any data manipulation
Code Block framer.deliverInputNoCopy(length: length, message: message, isComplete: true)
the downstream protocol receives isComplete false.
So the question is this a bug or what should be done to preserve isComplete flag ?