完善机器人

This commit is contained in:
aozhiwei 2019-05-22 15:54:11 +08:00
parent 686ce618ef
commit 1f27ab8bc6
2 changed files with 3 additions and 5 deletions

View File

@ -21,7 +21,7 @@ def main():
help = "account info")
(options, args) = parser.parse_args()
ws_url = args if args else 'ws://127.0.0.1:83/websocket'
ws_url = args if args else 'ws://192.168.100.21:7101/websocket'
for account in options.accounts.split(','):
ioloop.IOLoop.current().spawn_callback(createVirtualClient, account, ws_url)

View File

@ -57,11 +57,9 @@ class VirtualClient(object):
print('')
def sendLogin(self, conn):
msg = cs_proto_pb2.CMLogin()
msg.server_id = 1
msg = cs_proto_pb2.CMJoin()
msg.server_id = 2
msg.account_id = self.account
msg.session_id = '12342'
msg.device_id = '123456'
self.sendMsg(conn, msg)
def parsePacket(self, conn, recv_buf):