Hi Diego, On Sun, Apr 24, 2005 at 09:18:40PM +0200, Jorge Arellano Cid wrote:
On Sun, Apr 24, 2005 at 10:18:17AM +0200, Jorge Arellano Cid wrote:
Hi Diego,
On Sat, Apr 23, 2005 at 02:34:07PM +0200, Diego Sáenz wrote:
Hmm, what's the status of the cookies dpi?
It is almost done, but i need an answer to a big doubt before it.
how can a function wait(with a timeout if posible) until the cookies dpi send the answer to dillo after dillo have send to dpi cookies a get_cookies command?
Just let it block. Of course a non-blocking timeout or callback approach can be used (as with DNS or HTTP), but in this case the wait time is so short that it is not worth (it will be faster than bookmarks).
Unfortunately, after a long look into the code, I found out that there's no easy way to make it block (the natural way).
Making it non-blocking is possible but non-trivial. I'll give it another try tomorrow...
Here's the patch! (I will send to you, not to the list). After a long day of coding a really hairy hack to make a non- blocking approach, It was almost working, but I didn't push it further because it was too ugly! :-) The good part is that after all that thought, a natural way to make it block came to me, so that's what the patch is. It has all the necessary stuff to bind your work. It comes with a custom cookies.dpi server example, the query is shown on stdout... Oh, it will be clear from the patch and its comments... It was a heavy context switch, now I'm back to the FLTK port. -- Cheers Jorge.-