In addition to this, diameter module is now implemented using the supervisor behaviour. Functionality has not changed, but at least the foundations to take advantage of OTP have been laid. The statements to test the examples are now:
diameter:start_link().
PidC = diameter_client:start().
PidS = diameter_server:start().
Other minor changes are:
- Encoded command headers now have different End-To-End-Id and Hop-By-Hop-Id. Previously they were just set to 0, which is not compliant with RFC3588.
- Encoded command contents are now printed so it's easier to debug looking at the messages that are being send and received.
2 comments:
You could make diameter_server and diameter_client OTP compliant using gen_server or gen_fsm. You just need to handle receiving in the handle_info callback.
Hello Vance. Yes, that's a good idea. I will work on it. Thanks for pointing me to the right direction in this project.
Post a Comment