赞
踩
- from socketIO_client import SocketIO
-
-
- hosts = 'http://websocke.server.com'
- port = 3000
-
- # 收到message消息处理过程
- def on_message(*args):
- # print "recv:", args
- # print "geted:", type(args[0])
- if type(args[0]) is types.DictType:
- rp = args[0]
- print "recv:", rp
-
- sk = SocketIO(hosts,port=port)
- sk = SocketIO(hosts,port=port,params={'token': 'ksdjfkjdf'}) #create connection with params
-
- # add lisenter for message response
- sk.on('me
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。