With a little more effort, diameterl has become an application. Now diameter stack must be started as any other OTP application:
application:load(diameter).
aplication:start(diameter).
and stopped the same way:
application:unload(diameter).
application:stop(diameter).
Now development will focus on the improvement of the diameter_client and diameter_server examples using gen_fsm and gen_server to implement the diameter peer state machine as defined in RF3588.
Subscribe to:
Post Comments (Atom)
2 comments:
Nice, I'm going to dig into your code today.
Now it is an application it is part of the supervision hierarchy and so you don't really have to stop it nicely. init:stop() should also do it , about as subtly as exit(0) but assuming you're trapping exits the terminate() method will be called in the gen_servers.
Under your structure you have thing s structured as servers so more commands and avps can be dynamically added right?
Hello Bwooce. Thanks for your comment.
At the moment definitions are loaded when servers are started so it's not possible to add them dynamically. However, it shouldn't be difficult to change code to make it possible (just adding a new handle_call pattern and use the add_definition function).
Anyway, I will keep it in mind as a future improvement and implement it when possible.
Post a Comment