<br><div>Sorry,</div><div><br></div><div>It should be this:</div><div><br></div><div><br></div><div>application = service.Application(&#39;finger&#39;)<br>f = FingerService()<br>f.setServiceParent(application)</div><div><br>
</div><div>serviceCollection = service.IServiceCollection(application)<br>internet.TCPServer(9000, f.get_FingerFactory()<br>&nbsp;                  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ).setServiceParent(serviceCollection)</div><div><br>
</div><div><br></div><div class="gmail_quote">2012/2/4 ÔÂÓÇÜø <span dir="ltr">&lt;<a href="mailto:yueyoum@gmail.com">yueyoum@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><br></div><div>Oh, &nbsp;Thanks !<br></div><div><div>It works!</div></div><div class="im"><div><br></div><div><br></div><div>application = service.Application(&#39;finger&#39;)</div><div>f = FingerService()</div></div><div>
f.setServiceParent(application)</div>
<div>internet.TCPServer(9000, f.get_FingerFactory())</div><div><br></div><div><br></div><div><br></div><br><div class="gmail_quote">2012/2/4  <span dir="ltr">&lt;<a href="mailto:exarkun@twistedmatrix.com" target="_blank">exarkun@twistedmatrix.com</a>&gt;</span><div>
<div class="h5"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>On 06:11 am, <a href="mailto:yueyoum@gmail.com" target="_blank">yueyoum@gmail.com</a> wrote:<br>
&gt;Thanks for reply<br>
&gt;<br>
&gt;Yes, of course.<br>
&gt;<br>
&gt;I followed the turotial ,<br>
&gt;<br>
</div><div>&gt;class FingerService(service.Service):<br>
&gt; &nbsp; &nbsp;...<br>
&gt; &nbsp; &nbsp;def startService(self):<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;print &#39;start service&#39;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;....<br>
&gt;<br>
&gt;application = service.Application(&#39;finger&#39;)<br>
&gt;f = FingerService()<br>
&gt;serviceCollection = service.IServiceCollection(application)<br>
&gt;internet.TCPServer(9000, f.get_FingerFactory()<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;).setServiceParent(serviceCollection)<br>
<br>
</div>Notice that nowhere here does `f` get attached to `application`. &nbsp;You<br>
need this:<br>
<br>
 &nbsp; &nbsp;f.setServiceParent(application)<br>
<div><div><br>
Jean-Paul<br>
<br>
_______________________________________________<br>
Twisted-Python mailing list<br>
<a href="mailto:Twisted-Python@twistedmatrix.com" target="_blank">Twisted-Python@twistedmatrix.com</a><br>
<a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python" target="_blank">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python</a><br>
</div></div></blockquote></div></div></div><br>
</blockquote></div><br>