[
https://issues.apache.org/jira/browse/SSHD-1080?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17197652#comment-17197652
]
Guillaume Nodet commented on SSHD-1080:
---------------------------------------
The more I look at it and the less I see a common point between those methods.
The only thing is that they have the same signature, but they even had
different names before the introduction of the {{PacketWriter}} interface, and
that's because they *are* different.
Same signature does not imply same semantics, and a common interface should
only be used when the semantic is the same.
So I think we should keep the {{PacketWriter}} for writing packets to the
{{Channel}}, this will allow keeping the throttler without any change mostly.
The {{Channel.writePacket}} method should be removed so that everything goes
through the {{PacketWriter}}. The {{IoSession}} and {{IoOutputStream}} don't
deal with SSH packets and should not implement {{PacketWriter}} and the methods
should be renamed to {{write}} instead of {{writePacket}} (as they really only
deal with bytes).
The {{Session.writePacket}} should be kept as is, just without having the
{{Session}} implementing {{PacketWriter}}.
I'll propose a PR later.
> Revisit the PacketWriter interface
> ----------------------------------
>
> Key: SSHD-1080
> URL: https://issues.apache.org/jira/browse/SSHD-1080
> Project: MINA SSHD
> Issue Type: Improvement
> Reporter: Guillaume Nodet
> Priority: Major
>
> The expectations when using {{Session.writePacket}}, {{Channel.writePacket}}
> and {{IoOutputStream.writePacket}} are different, so I don't think it's a
> good idea to use a single interface for those.
> The only real place where it's used is in the {{ThrottlingPacketWriter}}
> which would need to be reworked.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]