只有研究其原理才能真正弄明白其中的道理的。
比如说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.
阅读(1118) | 评论(0) | 转发(0) |