<div id="RTEContent">Thanks everybody, finally I've made it call the stopService(). However even I return a deferred in the stopService, it still quit before the callback is called. Can anyone give me an example of returning a deferred in stopService()? Thanks anyone.<br><br><b><i>Christopher Armstrong &lt;radeex@gmail.com&gt;</i></b> 弧<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> ]On 12/5/05, Suet Lung Cheung <suetlung2003 @yahoo.com.hk=""> wrote:<br>&gt; Hi Paul,<br>&gt;      Thanks for your reply again. Your example works for me. I found the<br>&gt; difference. I use a serviceCollection to include my service. Does it mean<br>&gt; anything? my code is in this way...<br>&gt;  application = service.Application('chatroom')<br>&gt;<br>&gt;  f = ChatService()<br>&gt;  serviceCollection = service.IServiceCollection(application)<br>&gt;  internet.TCPServer (1234,<br>&gt;
 ChatFactoryFromService(f)).setServiceParent(serviceCollection)<br>&gt;<br>&gt; and I have implemented stopService() in ChatService. Is it different if I<br>&gt; use serviceCollection? Thanks again.<br><br>It looks like the problem here is that you're not setting your<br>ChatService's service parent to the application (by the way, you don't<br>need to adapt to IServiceCollection - setServiceParent tries to adapt<br>to IServiceCollection itself).<br><br>application = service.Application('chatroom')<br>f = ChatService()<br>f.setServiceParent(application)<br>...<br><br>should sort you out.<br><br><br><br>--<br>  Twisted   |  Christopher Armstrong: International Man of Twistery<br>   Radix    |    -- http://radix.twistedmatrix.com<br>            |  Release Manager, Twisted Project<br>  \\\V///   |    -- http://twistedmatrix.com<br>   |o O|    |<br>w----v----w-+<br><br>_______________________________________________<br>Twisted-web mailing
 list<br>Twisted-web@twistedmatrix.com<br>http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web<br></suetlung2003></blockquote><br></div><p>_______________________________________<br> 離線訊息 - Yahoo! Messenger<br> 就算你沒有上網,你的朋友仍可以留下訊息給你,當你上網時就能立即看到,任何說話都冇走失。<br>  http://messenger.yahoo.com.hk