On Tue, Feb 4, 2020 at 6:12 PM Go Luhng <golu...@gmail.com> wrote:
>
> Thanks Colin and Barry for the reply. I read the sans-io docs and it
> is an attractive approach.
>
> I believe I have a plan going forward, but I'm not sure what you mean
> by explicit vs implicit state machine, if you care to elaborate.

I realize now that in my previous reply I conflated state machine with
parser state. Sorry about that!

Neither IntNStringReceiver nor LineOnlyReceiver has much in the way of
state. LineReceiver does, but it's a simple flag (line or raw mode).
conch.ssh's SSHTransportBase has more:
https://github.com/twisted/twisted/blob/twisted-19.10.0/src/twisted/conch/ssh/transport.py#L456-L471
This is reasonably explicit. It's still mixed in with the protocol
methods, but the states are at least explicitly declared.

I wasn't able to find an example in Twisted of an implicit state
machine. Maybe someone else has a concrete example somewhere?

_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
https://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Reply via email to