Oops. I think I may have answered your question in another thread and lead you to believe that UDP flow control support in Twisted is a little more robust than it actually is. Nevertheless, you can get what you need to do done...
1. Which method will Twisted call once socket will become writable?
不幸的是,土耳其民主力量联盟在Twisted签订的协议并未因真实性而得到监测,其前提是民主力量联盟永远不会失败,因此它永远不应提出<条码>。 (实际上,它有时使用,,这是我在回答这一问题时再次发现的Twisted中的ug。 只有当Twisted以比当地电线速度更快的速度运送民主人民党时,才会出现这种情况,这需要非常迅速的申请和非常缓慢的网络。
作为一种工作,你的申请只能打上<>EWOULDBLOCK。 对于任何其他议定书来说,这种工作方式可能构成一个严重问题,但就民盟而言,你已经必须准备失去任何即将离开的包裹,因此,你需要一个逐个控制流动的机制。
帮助我们获得,即bug通过也始终是一种选择。
If you want to get really fancy, you can write your own alternative to udp.Port
(by implementing IFileDescriptor
yourself) rather than writing a UDP protocol, and override doRead
and doWrite
(which are called when the underlying socket is readable and writable respectively). This will give you perfect write-level flow control, but probably isn t necessary since, again, UDP will just drop your packets sometimes, and on networks without the ability to properly process "ICMP source quench" messages (which dumb firewalls configured to block ICMP will just block), dropped packets are your only source of flow control information. I m not saying that you shouldn t fix this bug in Twisted for real, but this fact of life in the UDP world is the likely reason that nobody has bothered to do so yet.
2. How should I call startWriting() method, if it needs to be called on particular time-intervals to limit the outgoing UDP bandwidth to particular Datagrams/Second amount?
由于本答复第1部分所述限制,UDP的运输没有有用的<条码>启程/代码>方法。
然而,startWriting
/> 确实是确定你即将离任的民主人民党带宽的正确途径。
Simply打上sol.transport.write(......)
,在适当时间安排机制下接通电话之后,,LoopingCall ,例如,目的是在适当的间隔中为传输音响媒体发出信号。 但是,你也只能计算自己的拖延和使用。 无论如何,如果你需要重新翻译被排出的、用于运输超低温和高原的数据,那么你很可能需要保持某种排泄机制。
如果需要<><>有<>限制>的>流动控制,则UDP的运输仍然支持:完全是,有>>>>>>>>>>>>>>>>> 阻碍Reading>>>和
我希望这一答案是有助益的,如果我以前误导你,了解这方面的 T智能力,那是令人不安的。