Chinaunix首页 | 论坛 | 博客
  • 博客访问: 26326813
  • 博文数量: 2065
  • 博客积分: 10377
  • 博客等级: 上将
  • 技术积分: 21525
  • 用 户 组: 普通用户
  • 注册时间: 2008-11-04 17:50
文章分类

全部博文(2065)

文章存档

2012年(2)

2011年(19)

2010年(1160)

2009年(969)

2008年(153)

分类: Python/Ruby

2009-03-26 15:10:22

只有研究其原理才能真正弄明白其中的道理的。
比如说ASP、PHP、之类的运行在服务器端就只管服务器的东西了其他的一概不要管它。
1.The normal model when using the Twisted framework is the third model: non-blocking calls.
2. In asynchronous programming, a function requests the data, and lets the library call the callback function when the data is ready.
3. it may also return before it is possible to detect errors: failed connections, erroneous data, protocol errors, and so on. Just as you can add callbacks to a Deferred which it calls when the data you are expecting is available, you can add error handlers ('errbacks') to a Deferred for it to call when an error occurs and it cannot obtain the data:
4.learnt that the Twisted framework supports concurrency in the form of asynchronous calls;类似于AJAX的异步调用模式。

5.Twisted Internet contains the various interfaces to the reactor API, whose usage is documented in the low-level chapter. Those APIs are IReactorCore, IReactorTCP, IReactorSSL, IReactorUNIX, IReactorUDP, IReactorTime, IReactorProcess, IReactorMulticast and IReactorThreads. The reactor APIs allow non-persistent calls to be made.


阅读(1098) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~