From: Francis Cianfrocca Date: 2007-01-02T22:49:16+09:00 Subject: Re: Open source credit card processing in ruby ------=_Part_135572_17705086.1167745754876 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 1/2/07, cremes.devlist@mac.com wrote: > > > On Jan 2, 2007, at 12:02 AM, Francis Cianfrocca wrote: > > > On 1/1/07, snacktime wrote: > >> > >> > I'd love to see it just so I could see a (hopefully) good example > >> > using eventmachine and a home-grown protocol using netstrings. > >> > >> There is some netstrings sample code in the eventmachine repository > >> somewhere, that's where I got the idea from. I'd never really looked > >> at it before, and when I did I liked it. It's great for simple line > >> oriented tcp protocols. > > > > I realize this is offtopic but are any of you guys interested in > > adding an > > industrial-strength netstrings implementation to the EM package? > > Define industrial strength. :-) > > I have some interest in this area. Feel free to contact me off-list. > > cr > > Well, I'm assuming from the little that I know that netstrings is something like BER: you have encodings and decodings for things that can become marshalled objects. I'd like to simplify the process of writing clients and servers that are based purely on netstrings (and then we can add hybrids later). So I'm imagining a subclass of EventMachine::Connection in which the receive_data method can read netstrings, and when it detects one, it calls a method (#received_netstring ?) that can be subclassed by the user. On the client side, you'd want to be able to say #send_netstring(*args), and it would just do the right thing with a variety of inputs. Does this make any sense? ------=_Part_135572_17705086.1167745754876--