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.

cjs
-- 
Curt Sampson       <cjs / starling-software.com>        +81 90 7737 2974   
Starling Software     <office-admin / starling-software.com>
Mobile sites and software consulting: http://www.starling-software.com