Ulf Wiger (TN/EAB)
Fri Jan 16 15:02:33 CET 2009
Steve Davis skrev:
> On Jan 16, 4:39 am, "Ulf Wiger (TN/EAB)" <ulf.wi...@REDACTED>
>> I also wrote a small contract-to-hrl generator, so
>> that I could specify the messages in UBF and refer
>> to the resulting records in the code. This allowed
>> me to write callbacks that simply matched on the
>> record pattern, since I could trust that UBF had
>> both parsed the data for me, and verified that the
>> types and context were ok.
> What a truly **excellent** idea!
Well, if you think so, here's the actual code. (:
>> - UBF doesn't support much in terms of asynchronous
> Was the facility provided by EVENT too limiting in some way?
That was what put it in the "not much" category, and we
did use EVENTs, but you can't specify a contract that
lets the server receive asynchronous events that affect
its state. The only thing you can specify is which events
the server can send in each state.
This means that the contract checker cannot be used for
asynchronous protocols (such as, say, SIP, which is
the standard for IP telephony, or XMPP which is the
standard for IRC.)
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the erlang-questions