[erlang-questions] "calling" a gen_fsm

Roger Lipscombe roger@REDACTED
Tue Sep 22 21:02:43 CEST 2015


On 22 September 2015 at 18:37, Garry Hodgson <garry@REDACTED> wrote:
> thanks to both of you for your quick and helpful answers.
> gotta love this list.

Both Theepan and Vance are correct in that this is a useful way to
build this kind of thing. In fact, there's a good example (using a
gen_server, rather than a gen_fsm) here:
https://erlangcentral.org/wiki/index.php?title=Building_Non_Blocking_Erlang_apps

I'd just add one point, though: I recently built something similar,
and I found it simpler to separate the client into two processes: one
gen_fsm to handle the state machine, and a separate gen_server to
handle the decoding and framing.



More information about the erlang-questions mailing list