From: Tri S. <tr...@us...> - 2011-06-09 08:27:35
|
Hi, The sample application meant to be simple demonstration and it just bails out at the user log out. This immediate exit leaves the socket closing codes no chance to execute. If you modified the code to allow the program still running on its main processing loop, then the socket closing codes will be called on socket close event. So, to log out of a session, you just need to call yahoo_logoff() *without* yahoo_close() with a given id and then keep running the processing loop. Note that as you can see the yahoo_logout() called yahoo_close() just after calling yahoo_logoff(), this prevents further processing. Now with the log off packet already sent, at some point in the loop the yahoo server will acknowledge and close the connection and our socket closing callback will get called. You can easily inspect the yahoo_callback() call trace to get the picture. Cheers, Tri On Thu, Jun 9, 2011 at 1:09 PM, we axzz <mya...@gm...> wrote: > while im running client_sample and re-wrote the area that while calling > function yahoo_logout(); and not exit the applications, > but it seems not closing socket, so my id still login, even though i've > called function yahoo_logout(), > question : > is there a way to logout and closing the socket ? > > > thanks |