<div><br></div><div>Oh,  Thanks !<br></div><div><div>It works!</div></div><div><br></div><div><br></div><div>application = service.Application(&#39;finger&#39;)</div><div>f = FingerService()</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">exarkun@twistedmatrix.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 06:11 am, <a href="mailto:yueyoum@gmail.com">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 class="im">&gt;class FingerService(service.Service):<br>
&gt;    ...<br>
&gt;    def startService(self):<br>
&gt;        print &#39;start service&#39;<br>
&gt;        ....<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;                            ).setServiceParent(serviceCollection)<br>
<br>
</div>Notice that nowhere here does `f` get attached to `application`.  You<br>
need this:<br>
<br>
    f.setServiceParent(application)<br>
<div class="HOEnZb"><div class="h5"><br>
Jean-Paul<br>
<br>
_______________________________________________<br>
Twisted-Python mailing list<br>
<a href="mailto:Twisted-Python@twistedmatrix.com">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><br>