Open beachcitiessoftware opened 1 year ago
I found out that there are some functions that you can set for just callbacks. Suppose you have
def handle_start_notifying(data):
print(data)
def handle_stop_notifying(data):
print(data)
def message_handler(message):
print(data) # message format
server = BlessServer(...)
...
await server.start()
server.app.StartNotify = handle_start_notifying # It seems that the input is None every time
server.app.StopNotify = handle_stop_notifying # It seems that the input is None every time
server.app.bus.add_message_handler(message_handler)
Check this for the message_handler object
Describe the solution you'd like It would be great if the BlessServer could expose some callbacks, for when a connection / disconnection occurs.