[erlang-questions] gen_fsm and keepalive timer

Ivan Ostres iostres@REDACTED
Thu Dec 29 18:51:44 CET 2011


Hi all!

I am trying to implement FSM of a protocol inside gen_fsm behavior. For 
a keepalive purpose I need a timer that would produce event when timer 
is expired so I could know when to send a keepalive packet and to know 
when holdtime is gone (I didn;t receive keepalive packet from other 
side). I was trying to get more info on gen_fsm:start_timer but 
documentation is a bit sparse - it's clear how to create timer but not 
how to catch it's event (well, at least to me since this is first time I 
am using gen_fsm).

If someone could explain this in few sentences I would be very grateful. 
Also if there is a better way for keepalive mechanism inside gen_fsm, I 
would like to know it.

Thanks and regards,
Ivan Ostres



More information about the erlang-questions mailing list