<div dir="ltr"><div><div><div><div><div>I need to implement a "service" functionality which allows the "client" to implement callbacks (from service into client's module) which it wishes to handle.<br><br></div>I accept the module name as parameter from the client and mandate the function names (callbacks) and parameters thereof which the client may define in its module.<br><br></div>Suppose one of the callback names is 'handle_tick', and the module name supplied by the client is held in variable 'Module' in my service implementation code.<br><br>How do I verify whether client has implemented the function handle_tick() in its module? Or, do I just invoke it and handle the exception using try-catch?<br><br></div>Thanks<br></div>Avinash<br><br></div>PS: I observe that the web sockets functionality in Yaws uses similar mechanism to invoke callbacks in client's module. But, digging into Yaws' source code is a little too overwhelming for me :-(<br></div>