在Python中从UDP执行异步套接字读取的最简单方法? [英] Easiest Way to Perform Asynchronous Socket Reading from UDP in Python?

查看:291
本文介绍了在Python中从UDP执行异步套接字读取的最简单方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试找到从python中的多个(大约100个)udp数据报套接字读取的最简单方法.我看过龙卷风,但是龙卷风吹捧http/tcp而不是udp支持.

I am trying to find the easiest way to read from multiple (around 100) udp datagram sockets in python. I have looked at tornado, but tornado touts http/tcp rather than udp support.

现在我有专用于每个udp套接字的线程;但是,这似乎不是很有效.

Right now I have threads dedicated to each udp socket; however, this doesn't seem very efficient.

推荐答案

我必须承认我从未使用过它,但也许扭曲会满足您的需求.

I must confess I never used it, but maybe Twisted will suit your needs.

它支持许多协议,甚至是串行连接.

It supports lots of protocols, even serial connections.

这篇关于在Python中从UDP执行异步套接字读取的最简单方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆