def open(self):
    self.connections.add(self)
print('New connection was opened')
self.write_message('Conn!')

def on_message(self, message):
    print('Got :', message)
self.write_message('Received: ' + message)

def on_close(self):
    self.connections.remove(self)
print('Conn closed...')
Python Tornado отправляет сообщение всем соединениям