Re: [Libevent-users] UDP Support

2012-12-12 Thread Adrian Chadd
... why would you want to use bufferevent for this? You really want something like bufferevent, except: * You want to attach source/destination IP:port info, as an option; * You want to support scatter/gather IO as an option; * You want to be able to have well defined boundaries - ie, "This is a

Re: [Libevent-users] epoll_wait-like timeout with libevent (tick generation)

2012-10-16 Thread Adrian Chadd
On 16 October 2012 04:35, Programmist Setevik wrote: > Portability issues aside, is there a way to ask event_base_* functions > to enforce epoll_wait()-like timeout ? > > I need to have an ability to generate "ticks" - say once every 100 > msec or thereabouts and run some callbacks whenever ticks

Re: [Libevent-users] cancel pending events on bufferevent

2012-09-23 Thread Adrian Chadd
On 23 September 2012 07:50, Vadym S. Khondar wrote: > (The task is: after certain point need to give up on bufferevent without any > callbacks invoked as they might be called with already freed structs as > cbarg). The oft-overlooked problem with threaded code is that you can't guarantee you can

Re: [Libevent-users] Deadlock when calling bufferevent_free from an other thread

2012-08-09 Thread Adrian Chadd
Hi Nick/Others, The thing to realise is that the current libevent _API_ doesn't lead itself to being thread-safe. This is my motivation behind my original comment of "threading should be left to the API user, not the library." I had the same problem in Squid. The internal APIs don't lead themsel

Re: [Libevent-users] Deadlock when calling bufferevent_free from an other thread

2012-08-08 Thread Adrian Chadd
On 8 August 2012 15:30, Nick Mathewson wrote: > Specifically, let me follow up with what I need: I need people with > good programming taste to read and understand that message, and let me > know whether you've got any good ideas for fixing it, or whether you > think my ideas are reasonable. Any

Re: [Libevent-users] evdns timeout behaviour

2012-07-07 Thread Adrian Chadd
.. what do other operating systems do? Eg, what does the bind "libc" implementation of name lookups do? (ie, what user applications can do, not what BIND itself does.) Adrian *** To unsubscribe, send an e-mail to majord...@freeha

Re: [Libevent-users] [nicholas.marri...@gmail.com: libevent and invalid fds]

2012-02-08 Thread Adrian Chadd
.. wait, you mean "fix the OS because you can't debug google chrome" ? :-) Adrian *** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

Re: [Libevent-users] Asynchronous writes in the event loop model

2012-02-06 Thread Adrian Chadd
Hi, the standard trick: * designate one thread as "signals here" and block signals on all other threads; * use pipes for sending signals between threads (ie, to wake them up); * wish that kqueue and similar methods were portable. adrian *

Re: [Libevent-users] [libevent-usr] When is a [regular file descriptor] readable or writable?

2011-08-03 Thread Adrian Chadd
That's because it doesn't work that way for file backed file descriptors. There's no way to know a file is or isn't ready for writing, unless you had some way of defining (say) how much data is in the write buffer for that FD. Linux/FreeBSD at least don't supply this to you. Similarly, there's no

Re: [Libevent-users] libevent + bufferevent + IOCP = confused

2011-07-02 Thread Adrian Chadd
On Sat, Jul 02, 2011, Nick Mathewson wrote: > The select-based backend is still used for the event interface > provided by event_add, event_del, etc. It turns out that you can't > emulate that using IOCP, as far as I can tell.[*] If you want to use > IOCP, you need to use bufferevents: the buffe

Re: [Libevent-users] Unitialized Memory Read when pushing >64 events at once

2011-06-04 Thread Adrian Chadd
On Sat, Jun 04, 2011, Nick Mathewson wrote: > On Sat, Jun 4, 2011 at 2:14 PM, Scott Dorr wrote: > > Sorry I didn't get a chance to fiddle with this until just now. ?The short > > program below does generate uninitialized memory reads when executing the > > printf(). ?If I add a memset() right afte

Re: [Libevent-users] bad request with evhttp libevent-2.0.10

2011-01-19 Thread Adrian Chadd
On Wed, Jan 19, 2011, Nick Mathewson wrote: > On Thu, Jan 13, 2011 at 12:34 AM, Adrian Chadd wrote: > > It's best to assume browsers don't do the right thing in 100% of cases. > > > > (Been there, done that with Squid..) > > Ick. Okay, what does Squi

Re: [Libevent-users] bad request with evhttp libevent-2.0.10

2011-01-19 Thread Adrian Chadd
On Wed, Jan 19, 2011, Nick Mathewson wrote: > On Thu, Jan 13, 2011 at 12:34 AM, Adrian Chadd wrote: > > It's best to assume browsers don't do the right thing in 100% of cases. > > > > (Been there, done that with Squid..) > > Ick. Okay, what does Squi

Re: [Libevent-users] bad request with evhttp libevent-2.0.10

2011-01-12 Thread Adrian Chadd
It's best to assume browsers don't do the right thing in 100% of cases. (Been there, done that with Squid..) Adrian On Thu, Jan 13, 2011, Trong Long Dinh wrote: > I haven't read RFC 3986. Maybe | _is_ an invalid URI character. But what > happen when i want pass a param contain '|' character. If