From: "Jesús Gabriel y Galán" Date: 2007-11-29T17:29:35+09:00 Subject: Re: Custom Protocol On Nov 29, 2007 4:45 AM, Curt Sampson wrote: > On 2007-11-29 12:18 +0900 (Thu), thefed wrote: > > > On Nov 28, 2007, at 6:55 PM, Curt Sampson wrote: > > > > >Typically, protocols have state. So I'd start with as clear an > > >expression of the protocol state machine as you can generate, and then > > >see about twisting it into a DSL that can be implemented in Ruby. > > > > What do you mean by state machine? > > http://en.wikipedia.org/wiki/State_machine > > For a typical protocol, you might have states such as: > > - Idle > - Sent start message, waiting for response > - Connection running but idle > - Message sent, waiting for response, > > And you'd move between various states based on the packets you send. > > I will send you (off-list) an example of a state machine described in a > DSL embedded in Ruby. I would like to see that example on-list, or at least be part of the off-list conversation, if possible :-). Thanks, Jesus.