def on_message(self, message):
for client in ChatWebSocket.clients:
print(client)
t=json.loads(message)
client.write_message(json.dumps('Content-type:application/json\n'))
client.write_message(json.dumps({'a':t['b']}))
print(t['b'])
问题是客户端像普通字符串一样接受它而不是标题请帮助