Seeking advice on port "pattern" (long)

Sean Hinde Sean.Hinde@REDACTED
Tue Jun 26 15:52:26 CEST 2001


>  2. You could write your decoder in a continuation
>     based style. So instead of having to do the
>     append (AllData = Buffered++Data) your decoder
>     returns either { Id, Req, Result } , { parseError, Details } ,
>     or {needmore, Cont}. When new data arrives, you
>     feed it into your continuation ( Cont(Data) ), which
>     again will return any of the three possibilities above.

Can you provide an example of what you mean? I know Joe posted one some time
ago but I can't find it and haven't quite managed to figure it out for
myself.

Thanks,

- Sean



NOTICE AND DISCLAIMER:
This email (including attachments) is confidential.  If you have received
this email in error please notify the sender immediately and delete this
email from your system without copying or disseminating it or placing any
reliance upon its contents.  We cannot accept liability for any breaches of
confidence arising through use of email.  Any opinions expressed in this
email (including attachments) are those of the author and do not necessarily
reflect our opinions.  We will not accept responsibility for any commitments
made by our employees outside the scope of our business.  We do not warrant
the accuracy or completeness of such information.




More information about the erlang-questions mailing list