Closed xtr1993 closed 2 years ago
when i use socket.io-client v1.0.1, i want to collect all the monitored data into an array buut after testing, it is found that the message is added to the array during the listening time, and the final array is still empty
socket.on(Socket.EVENT_MESSAGE, objects -> { String msg = initMsg(objects); linkedList.add(msg); LOGGER.info("receive: {}", initMsg(objects)); });
this code print logs: socket test =====> task_id:309618d1-7b53-4d8a-901e-bf83b28fe9ae, socketAddress: xxx:4100, message:
socket test =====> task_id:309618d1-7b53-4d8a-901e-bf83b28fe9ae, socketAddress: xxx:4100, message:
this end message is empty.
@darrachequesne
when i use socket.io-client v1.0.1, i want to collect all the monitored data into an array buut after testing, it is found that the message is added to the array during the listening time, and the final array is still empty
socket.on(Socket.EVENT_MESSAGE, objects -> { String msg = initMsg(objects); linkedList.add(msg); LOGGER.info("receive: {}", initMsg(objects)); });
this code print logs:
socket test =====> task_id:309618d1-7b53-4d8a-901e-bf83b28fe9ae, socketAddress: xxx:4100, message:
this end message is empty.
@darrachequesne