InterviewSolution
| 1. |
Can A Handler Be Changed After A Connection Is Established? Can One Be Removed? |
|
Answer» Yes, but not globally. Handlers assigned to ENDPOINTS will be automatically copied to the CONNECTIONS created by that endpoint. Changing a handler on an endpoint will only AFFECT future connections. Once a particular connection is created, it's handlers can be changed individually by calling the set_*_handler methods. Once changed, all future events of that type for that connection will use the new handler. To remove a handler that was previously set, call the set METHOD with nullptr or NULL. Yes, but not globally. Handlers assigned to endpoints will be automatically copied to the connections created by that endpoint. Changing a handler on an endpoint will only affect future connections. Once a particular connection is created, it's handlers can be changed individually by calling the set_*_handler methods. Once changed, all future events of that type for that connection will use the new handler. To remove a handler that was previously set, call the set method with nullptr or NULL. |
|