chat_hub.client.on('message_received', message_received)
chat_hub.server.invoke('send_message', 'Hello!')
chat_hub.client.off('message_received', message_received)
connection.close()
Using SignalR server from Python code