1
This commit is contained in:
parent
173b825763
commit
15ac657d30
@ -22,7 +22,11 @@ def main():
|
||||
(options, args) = parser.parse_args()
|
||||
|
||||
ws_url = args if args else 'ws://192.168.100.21:7101/websocket'
|
||||
for account in options.accounts.split(','):
|
||||
accounts = options.accounts.split(',')
|
||||
accounts = []
|
||||
for i in range(10):
|
||||
accounts.append('test' + str(i))
|
||||
for account in accounts:
|
||||
ioloop.IOLoop.current().spawn_callback(createVirtualClient, account, ws_url)
|
||||
|
||||
while True:
|
||||
|
@ -79,14 +79,14 @@ class VirtualClient(object):
|
||||
|
||||
def onReceiveUserPacket(self, conn, msgid, msgbody):
|
||||
try:
|
||||
print(datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S.%f'))
|
||||
#print(datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S.%f'))
|
||||
msg = getSMMsg(msgid)
|
||||
ret = msg.ParseFromString(msgbody)
|
||||
print(len(msgbody))
|
||||
print(time.time(), time.strftime('[%H:%M:%S]'), msg.DESCRIPTOR.name + '{')
|
||||
print(str(msg), end='')
|
||||
print('}')
|
||||
print('')
|
||||
#print(len(msgbody))
|
||||
#print(time.time(), time.strftime('[%H:%M:%S]'), msg.DESCRIPTOR.name + '{')
|
||||
#print(str(msg), end='')
|
||||
#print('}')
|
||||
#print('')
|
||||
except Exception as e:
|
||||
print('onReceiveUserPacket', e)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user