On 04/05/2019 05:40, David Trott wrote:
Hey Jonathan, I am transitively importing version 2.0.19 of mina-core through the sshd-core dependency (as I don't think it is safe to upgrade mina-core to 2.1 as I am using the sshd project). I started with the 2.1 version of the SshFilter as a template for the filter I am working on, as such it took some time to find the extra .mark() call which was present in the older version of the SslFilter. I am afraid my error handling/testing still needs some work, so all I can really say at the moment is that with the .mark() call in place the code appears to function correctly, however if the .mark() call is removed the code fails - specifically I only receive one packet then receive no further packets - again this is code compiled against mina-core 2.0. With respect to your specific points: 1> Some things aren't being back-ported to 2.0.X, the SSL improvements are one. I don't think this issue is specific to Ssl, I think it affects any filter that processes IoBuffers in the 2.0 code base (note: my test sample here is one project). Also note I do not use reset() anywhere in my code and the only mark() call I make is in a similar location to the one in the SslFilter.
FTR, the changes made in 2.1 where related to the way the messages were propagated down the chain after a session.write(). The idea is that each filter should never change the incoming data, which was not the case when it was a IoBuffer. In order for the messageSent() event to be properly handled in 2.0, we were forced to somehow mark it to remember where it started.
In 2.1, we have greatly simplified the messageSent() even processing, keeping a copy of the initial message and never touching it. We also limited the number of function calls (that should show in the stack calls)).
In any case, that made the 2.0 and 2.1 incompatible. Also note that in 2.0, you weren't able to use the compressionFilter in conjonction with the SslFilter, somthing the changes in 2.1 allow you to do.