sockjs-tornado

Private messaging using sockjs-tornado

廉价感情. 提交于 2019-12-29 08:03:07
问题 I have implemented chat feature using sockjs-tornado and could store the messages in RethinkDB. Could you please help me on how do I establish private channel for messaging in sockjs-tornado ? (I mean Private conversation / one to one) Below is the on_message function in my server side code - def on_message(self, message): str=message mg=str.split('#:#') sender=1 # This is the sender user id receiver=2 #This is the receiver user id - I need to implement session variables to have these id's so

Private messaging using sockjs-tornado

梦想与她 提交于 2019-11-29 11:56:13
I have implemented chat feature using sockjs-tornado and could store the messages in RethinkDB. Could you please help me on how do I establish private channel for messaging in sockjs-tornado ? (I mean Private conversation / one to one) Below is the on_message function in my server side code - def on_message(self, message): str=message mg=str.split('#:#') sender=1 # This is the sender user id receiver=2 #This is the receiver user id - I need to implement session variables to have these id's so that I can use it here this way ts=r.expr(datetime.now(r.make_timezone('00:00'))) connection = r