<div><br></div><div>Oh, Thanks !<br></div><div><div>It works!</div></div><div><br></div><div><br></div><div>application = service.Application('finger')</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"><<a href="mailto:exarkun@twistedmatrix.com">exarkun@twistedmatrix.com</a>></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>
>Thanks for reply<br>
><br>
>Yes, of course.<br>
><br>
>I followed the turotial ,<br>
><br>
</div><div class="im">>class FingerService(service.Service):<br>
> ...<br>
> def startService(self):<br>
> print 'start service'<br>
> ....<br>
><br>
>application = service.Application('finger')<br>
>f = FingerService()<br>
>serviceCollection = service.IServiceCollection(application)<br>
>internet.TCPServer(9000, f.get_FingerFactory()<br>
> ).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>