Re: [Libevent-users] bufferevent with custom IO

2012-10-15 Thread Joachim Bauch
On 10.09.2012 18:32, Joachim Bauch wrote: > On 10.09.2012 16:51, Nick Mathewson wrote: [...] >> I'd like a better distinction between functions that should be called >> by the implementation, and functions that exist to be called by the >> users of this type. Right now

Re: [Libevent-users] bufferevent with custom IO

2012-09-10 Thread Joachim Bauch
On 10.09.2012 16:51, Nick Mathewson wrote: > Having new *connect_hostname commands is making me think that maybe > this should be an abstract method of bufferevent that only some > bufferevent subtypes support. Yes, the whole "lookup-and-start-connecting" part should be refactored to a common meth

Re: [Libevent-users] bufferevent with custom IO

2012-09-10 Thread Joachim Bauch
On 08.09.2012 00:03, Mark Ellzey wrote: > On Thu, Sep 06, 2012 at 11:30:54PM +0200, Joachim Bauch wrote: >> Thanks for the heads up. The socket-based code surely will be helpful >> when the implementation starts. I wrote an initial draft of how the >> API could look like

AW: [Libevent-users] bufferevent with custom IO

2012-09-06 Thread Joachim Bauch
-Ursprüngliche Nachricht- Von:Nick Mathewson [...] > Sounds like a big but fun project. You might want to look at > bufferevent_sock.c first; bufferevent_openssl.c has to jump through a > lot of annoying hoops because the TLS protocol has a property that > doing a read at the TLS abst

[Libevent-users] bufferevent with custom IO

2012-09-05 Thread Joachim Bauch
Hi, I'm looking for a way to implement a bufferevent that uses a custom API to read/write data to the network - similar to what the SSL bufferevent does with the OpenSSL BIO. Any hints on what would be the best way to implement this? The easiest solution I came up was to copy most of bufferevent_

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

2011-08-09 Thread Joachim Bauch
chim >From e613b30a52ef54068e1d95504a0887e8870654d0 Mon Sep 17 00:00:00 2001 From: Joachim Bauch Date: Thu, 9 Jun 2011 23:33:58 +0200 Subject: [PATCH 1/2] support adding buffers to other buffers non-destructively --- buffer.c| 131 ++- evbuffer-internal

[Libevent-users] Patch: Propagate errors on SSL bufferevents

2011-07-26 Thread Joachim Bauch
Hi, SSL bufferevents that use another bev as underlying source don't propagate errors (like "connection closed") to the user. The attached patch fixes this. Best regards, Joachim >From dbaac89570df375721e1ed5a54ed52e4bee71e06 Mon Sep 17 00:00:00 2001 From: Joachim Bauch

[Libevent-users] Write watermarks in ssl bufferevents not working?

2011-07-04 Thread Joachim Bauch
Hi, the logic that handles write watermarks in "bio_bufferevent_write" is not working. It currently doesn't write any data if the high watermark is *above* the amount of data to write (i.e. when there is actually enough room available). Attached is a patch that fixes this. Best regards, Joach

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

2011-06-09 Thread Joachim Bauch
much easier to merge. Pointing at a > branch on a public git repository is also pretty good. Attached is an updated patch that addresses all your comments and should be easily mergeable after some more testing. Best regards, Joachim >From e613b30a52ef54068e1d95504a0887e8870654d0 Mon S

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

[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

Re: [Libevent-users] deadlock in libevent-2.0.5-beta

2010-07-02 Thread Joachim Bauch
Hi, On 01.07.2010 12:44, Avi Bab wrote: Running on Linux with pthreads. One thread (CBTcpProxyListenerThread below) adds bufferevents (with option BEV_OPT_THREADSAFE) to an event_base. A second thread (CBTcpProxySenderThread) dispatches on the event_base. have you tried creating your buffere

[Libevent-users] segfault when adding deferred callback

2009-11-19 Thread Joachim Bauch
Hi, just got a segfault in one of my threads while a deferred callback tried to scheduled another callback: Thread 56 (Thread 0x40b55950 (LWP 30440)): #0 0x0042a157 in event_deferred_cb_schedule (queue=0xa677e8, cb=0x9a5368) at event.c:1755 #1 0x00432c24 in _bufferevent_run_