|
695.
|
|
|
As an application <code class="API" base="twisted.application.service">service</code> , this new finger service implements the <code class="API" base="twisted.application.service">IService</code> interface and can be started and stopped in a standardized manner. We'll make use of this in the next example.
|
|
|
type: Content of: <html><body><p>
|
|
|
|
(no translation yet)
|
|
|
|
Located in
howto/tutorial/protocol.xhtml:80
|
|
698.
|
|
|
This version shows how, instead of just letting users set their messages, we can read those from a centrally managed file. We cache results, and every 30 seconds we refresh it. Services are useful for such scheduled tasks.
|
|
|
type: Content of: <html><body><p>
|
|
|
|
(no translation yet)
|
|
|
|
Located in
howto/tutorial/protocol.xhtml:93
|
|
700.
|
|
|
Since this verison is reading data from a file (and refreshing the data every 30 seconds), there is no <code>FingerSetterFactory</code> and thus nothing listening on port 1079.
|
|
|
type: Content of: <html><body><p>
|
|
|
|
(no translation yet)
|
|
|
|
Located in
howto/tutorial/protocol.xhtml:102
|
|
701.
|
|
|
Here we override the standard <code class="API" base="twisted.application.service.Service">startService</code> and <code class="API" base="twisted.application.service.Service">stopService</code> hooks in the Finger service, which is set up as a child service of the application in the last line of the code. <code>startService</code> calls <code>_read</code>, the function responsible for reading the data; <code>reactor.callLater</code> is then used to schedule it to run again after thirty seconds every time it is called. <code>reactor.callLater</code> returns an object that lets us cancel the scheduled run in <code>stopService</code> using its <code>cancel</code> method.
|
|
|
type: Content of: <html><body><p>
|
|
|
|
(no translation yet)
|
|
|
|
Located in
howto/tutorial/protocol.xhtml:106
|
|
702.
|
|
|
Announce on Web, Too
|
|
|
type: Content of: <html><body><h2>
|
|
|
|
(no translation yet)
|
|
|
|
Located in
howto/tutorial/protocol.xhtml:118
|
|
1989.
|
|
|
Use Python's dynamicity to create open ended state machines. See, for example, the code for the SMTP client.
|
|
|
type: Content of: <html><body><ul><li>
|
|
|
|
(no translation yet)
|
|
|
|
Located in
howto/servers.xhtml:204
|
|
2131.
|
|
|
<a href="specifications/index.xhtml">Specifications</a>: specification documents for elements of Twisted Core
|
|
|
type: Content of: <html><body><ul><li>
|
|
|
|
(no translation yet)
|
|
|
|
Located in
index.xhtml:11
|
|
2622.
|
|
|
Services, Persistance, and Security
|
|
|
type: String
|
|
|
|
(no translation yet)
|
|
|
|
Located in
img/twisted-overview.dia:1716
|