[英]Websocket python
Background:背景:
example of.csv file: [1]: https://i.stack.imgur.com/drikH.png例如.csv 文件:[1]: https://i.stack.imgur.com/drikH.png
I not sure how to receive the data continuously while checking the csv file.在检查 csv 文件时,我不确定如何连续接收数据。
maybe async?也许是异步的? Any suggestions?
有什么建议么?
Use threading in reading and writing the csv file.在读取和写入 csv 文件时使用线程。 When the server receives the data, store the data in a list and it will act as a queue.
当服务器接收到数据时,将数据存储在一个列表中,它将充当一个队列。 Inside the thread function you will restart the connection.
在线程 function 内,您将重新启动连接。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.