Re: [Libevent-users] Send evbuffer to multiple clients

2011-08-09 Thread Joachim Bauch
Hi, On 10.06.2011 23:21, Nick Mathewson wrote: [...] I think the locking mechanism has a few potential deadlocks and race conditions we need to worry about. [...] I finally got some time to continue working on this. Attached are more changes against my first patch, that should resolve the dead

Re: [Libevent-users] Send evbuffer to multiple clients

2011-06-10 Thread Nick Mathewson
On Fri, Jun 10, 2011 at 5:21 PM, Nick Mathewson wrote: [...] > Hm.  I worry that people will expect changes to the source buffer to > appear after the source buffer is added.  Ah well, we can fix that one > with appropriate documentation. Sorry about that. I tend to compose several para

Re: [Libevent-users] Send evbuffer to multiple clients

2011-06-10 Thread Nick Mathewson
On Thu, Jun 9, 2011 at 5:47 PM, Joachim Bauch wrote: Nice stuff; we're getting closer here. > Am Mittwoch, den 08.06.2011, 13:15 -0400 schrieb Nick Mathewson: >> Could we simplify stuff by also declaring that if you >> have an evbuffer which is added by reference to another evbuffer, the >> enti

Re: [Libevent-users] Send evbuffer to multiple clients

2011-06-09 Thread Joachim Bauch
Am Mittwoch, den 08.06.2011, 13:15 -0400 schrieb Nick Mathewson: > So if I understand here, the semantics are that once a chain has been > added by reference to another evbuffer, the chain is now supposed to > be immutable. Right. > Could we simplify stuff by also declaring that if you > have an

Re: [Libevent-users] Send evbuffer to multiple clients

2011-06-08 Thread Nick Mathewson
On Tue, Jun 7, 2011 at 7:08 PM, Joachim Bauch wrote: > Am Montag, den 06.06.2011, 20:29 -0400 schrieb Nick Mathewson: >> Hm.  If there's nothing hideously complex in the source buffer (that >> is, nothing added with evbuffer_add_file), you could try an >> appropriate combination of evbuffer_peek a

Re: [Libevent-users] Send evbuffer to multiple clients

2011-06-07 Thread Joachim Bauch
Am Montag, den 06.06.2011, 20:29 -0400 schrieb Nick Mathewson: > Hm. If there's nothing hideously complex in the source buffer (that > is, nothing added with evbuffer_add_file), you could try an > appropriate combination of evbuffer_peek and evbuffer_add_reference. > Other than that, I'm not think

Re: [Libevent-users] Send evbuffer to multiple clients

2011-06-06 Thread Nick Mathewson
On Wed, Jun 1, 2011 at 11:28 AM, Joachim Bauch wrote: > Hi, > > what is the best way to pass data from one evbuffer to multiple > clients (i.e. other evbuffers)? There seems to be no direct way as > the obvious "evbuffer_add_buffer" removes data from the source buffer. > > For now I use a combinat

[Libevent-users] Send evbuffer to multiple clients

2011-06-01 Thread Joachim Bauch
Hi, what is the best way to pass data from one evbuffer to multiple clients (i.e. other evbuffers)? There seems to be no direct way as the obvious "evbuffer_add_buffer" removes data from the source buffer. For now I use a combination of "evbuffer_pullup" and "evbuffer_add_reference" with my own