[erlang-questions] card game about gen_fsm how to

Sean Hinde sean.hinde@REDACTED
Wed May 28 20:08:48 CEST 2008


Hi,

gen_fsm provides the gen_fsm:send_all_state_event/2 API as a way to  
send messages that should be handled the same in all states. It will  
be handled in your Module:handle_event/3 callback.

Sean



On 28 May 2008, at 19:54, wenew zhang wrote:

> Dear All,
>     i used a gen_fsm in a cards game, when  gen_fsm-server in one  
> status ,(just like 'SEND_CARDS'),of course,the gen_fsm hold many  
> status like this,
> but whichever status the gen_fsm in, the client can send a force  
> quit message to interrupt the current status,
> i have more than ten status,need i write ten+ quit message process  
> in each status to fix this problem?
>
> that's very boring
>
> any simple solution to fix this?
>
> tks
>
> wenew zhang
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions




More information about the erlang-questions mailing list