shaunco commented on PR #2362: URL: https://github.com/apache/plc4x/pull/2362#issuecomment-3577652163
I had considered if there was some way to have the mspec protocol generators add new protocol functions like `CheckSync()` that could peek bytes from the receive buffer, using mspec knowledge, to declare the stream sane or not ... and if not, something like `Resync()` that, again using mspec knowledge, could return how many bytes to discard from the stream to attempt to become sane again. It seemed silly to only have this on modbus _(Ethernet padding leak could hit any protocol)_ and similarly silly to reimplement MBAP parsing/validation in the MessageCodec when most of that is sprinkled throughout the existing generated protocol code. The issue was I don't know nearly enough about mspec or the generators, and I only had this one live environment with Modbus to test against. I'm not in a rush if you want to hold on merging this for a better or more generalized method of handling this. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
