[Libevent-users] ANN: Libevent 2.1.3-alpha is released!

2013-05-01 Thread Nick Mathewson
bastian Hahn Greg Hazel Nicholas Heath Xiuqiang Jiang Azat Khuzhin Volker Lendecke Catalin Patulea Patrick Pelletier Dan Petro Nate Rosenblum Gyepi Sam *** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

Re: [Libevent-users] questions about bufferevent callbacks in multithreaded code

2013-05-01 Thread Nick Mathewson
be, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

[Libevent-users] questions about bufferevent callbacks in multithreaded code

2013-05-01 Thread Sashan Govender
Hi I need to clarify my understanding of how bufferevent objects work with mulithreaded code. If a bufferevent triggers a callback (read or write) does it hold a lock until that callback completes? Do the locks use a recursive mutex? Thanks

Re: [Libevent-users] Bufferevent filter with greedy sender

2013-04-27 Thread Nick Mathewson
ice and terse for inclusion in the manual, that would rock.) Let us know if it still doesn't make sense or doesn't work for you though. peace, -- Nick *** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

[Libevent-users] Re: Bufferevent filter with greedy sender

2013-04-27 Thread kgardenia42
at the filter callback has a "enum bufferevent_flush_mode > state" parameter. Is this relevant here? > > Thanks, *** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

[Libevent-users] Bufferevent filter with greedy sender

2013-04-27 Thread kgardenia42
To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

Re: [Libevent-users] Simple question about multithreading SSL bufferevents.

2013-04-25 Thread Nick Mathewson
x" from https://github.com/nmathewson/libevent/ . Alternatively, you could wait for 2.1.3-alpha, which I hope will be out pretty soon. best wishes, -- Nick *** To unsubscribe, send an e-mail to majord...@freehaven.net with unsub

Re: [Libevent-users] Simple question about multithreading SSL bufferevents.

2013-04-25 Thread John
probably be a better stress test than the simple test software I posted before. Thanks, -John From: Nick Mathewson To: libevent-us...@freehaven.net; John Sent: Thursday, April 25, 2013 11:36 AM Subject: Re: [Libevent-users] Simple question about multithreading SSL

Re: [Libevent-users] Simple question about multithreading SSL bufferevents.

2013-04-25 Thread Nick Mathewson
bevent 2.1.x-alpha released over this weekend. best wishes, -- Nick *** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

Re: [Libevent-users] Could not use event_base_foreach_event

2013-04-25 Thread Nick Mathewson
against libevent 2.0. -- Nick *** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

Re: [Libevent-users] libevent & SCTP

2013-04-25 Thread Nick Mathewson
o unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

[Libevent-users] libevent & SCTP

2013-04-25 Thread Alexander Drozdov
) *** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

[Libevent-users] Could not use event_base_foreach_event

2013-04-24 Thread Pritesh Acharya
I got symbol not found error on event_base_foreach_event. Has it been dropped? Thanks, Pritesh

Re: [Libevent-users] TCP client not calling writecb

2013-04-21 Thread Jan Danielsson
27;t really understand what I didn't realize it yesterday. :) -- Kind regards, Jan Danielsson *** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

[Libevent-users] Tricky bug when using libevhtp/libevent-openssl

2013-04-20 Thread JiaQiang Xu
t called recursively by libevent-openssl. Any clue on what happened? Thanks in advance. Jiaqiang ******* To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

Re: [Libevent-users] Enable/disable write callback for UDP

2013-04-20 Thread Andrew Danforth
functions as well, but I'm guessing the method > would be the same regardless). How is this done? > > -- > Kind regards, > Jan Danielsson > > *** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

Re: [Libevent-users] TCP client not calling writecb

2013-04-20 Thread Nir Soffer
ntcb(). But the client never prints "Write!". > > Rather than use a writecb(), I tried calling bufferevent_write() just > after the bufferevent_socket_connect(), but the data didn't reach the > server, which I found to be slig

[Libevent-users] TCP client not calling writecb

2013-04-20 Thread Jan Danielsson
;s clear I've misunderstood something pretty fundamental about bufferevents .. but what? -- Kind regards, Jan Danielsson *** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

Re: [Libevent-users] Enable/disable write callback for UDP

2013-04-20 Thread Nick Mathewson
re are probably other good approaches too. best wishes, -- Nick *** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

[Libevent-users] Enable/disable write callback for UDP

2013-04-20 Thread Jan Danielsson
Hello, I'm doing this (roughly): --- udp_sock = create_udo4_any_socket(""); evutil_make_socket_nonblocking(udp_sock); udp_event = event_new(base, udp_sock, EV_READ|EV_WRITE|EV_PERSIST, proc_udp_packet, (void*)base); event_add(udp_event, NULL); --

Re: [Libevent-users] Strange behaviour with bufferevents

2013-04-15 Thread Matt Dainty
about kqueue on OS X ;-) Apologies for the noise Matt *** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

[Libevent-users] Strange behaviour with bufferevents

2013-04-15 Thread Matt Dainty
it/libevent-graphite [1] http://graphite.readthedocs.org [2] https://gist.github.com/bodgit/5387076 *** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

Re: [Libevent-users] evbuffer_find versus evbuffer_search

2013-04-10 Thread Nick Mathewson
... ptrdiff_t len = pos.pos; You might find the reference manual helpful: http://www.wangafu.net/~nickm/libevent-book/Ref7_evbuffer.html yrs, -- Nick *** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

[Libevent-users] evbuffer_find versus evbuffer_search

2013-04-10 Thread Sashan Govender
Hi I'm porting some code from libevent 1.4 to 2.0 and in the 1.4 version some of the code is using evbuffer_find find a pointer to the start of a sequence then calculating a pointer difference from it: u_char* end = evbuffer_find(input, pattern, 2); ... ptrdiff_t len = end - input->buffe

Re: [Libevent-users] RFC: strategy for deadlock avoidance and safe finalization in Libevent 2.1

2013-04-10 Thread Nick Mathewson
r callbacks to event_callback too, we can simplify their code significantly, and use common logic to make all the callbacks in libevent get handled more efficiently. best wishes, -- Nick ******* To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

Re: [Libevent-users] RFC: strategy for deadlock avoidance and safe finalization in Libevent 2.1

2013-04-10 Thread Alexander Drozdov
ibevent/ . It implements the core features, but needs more polish, documentation, and testing. Thoughts? -- Nick *** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the bo

Re: [Libevent-users] Event callback from evbuffer_add_printf

2013-04-09 Thread Nick Mathewson
d immediately if it's invoked from within libevent callback. That way we avoid performance penalties *and* surprising results. yrs, -- Nick ******* To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

[Libevent-users] RFC: strategy for deadlock avoidance and safe finalization in Libevent 2.1

2013-04-09 Thread Nick Mathewson
fer event in multithreaded code. (See also the "Deadlock when calling bufferevent_free from an other thread" thread on libevent-users starting on 6 August 2012 and running through this February. See also my earlier writeup at http://archives.seul.org/libevent/users/Feb-201

[Libevent-users] Event callback from evbuffer_add_printf

2013-04-03 Thread Sebastian Sjöberg
ards, Sebastian Sjöberg*** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

Re: [Libevent-users] Evhttp client + conneciton pool

2013-04-01 Thread Mark Ellzey
etc). *** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

Re: [Libevent-users] Evhttp client + conneciton pool

2013-03-30 Thread Nir Soffer
On Mar 29, 2013, at 6:32 PM, lesa Le wrote: > > I'm trying to write a program to retrieve data using evhttp_make_request(). > It needs to handle a significant amount of requests per second, to a decent > amount of servers. Somewhere in the neighbourhood of 100s of servers, issuing > several re

[Libevent-users] Evhttp client + conneciton pool

2013-03-29 Thread lesa Le
Hi, I'm trying to write a program to retrieve data using evhttp_make_request(). It needs to handle a significant amount of requests per second, to a decent amount of servers. Somewhere in the neighbourhood of 100s of servers, issuing several requests per second. What I'm currently working on is s

Re: [Libevent-users] Simple question about multithreading SSL bufferevents.

2013-03-28 Thread Nick Mathewson
quot; -- have a look at the archives for more info on the status of that one.) (Wow, I should really answer that thread RSN.) -- Nick *** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

Re: [Libevent-users] [PATCH] Add sample/https-client.c, an example of stacking evhttp as a client on top of bufferevent_ssl.

2013-03-28 Thread Nick Mathewson
g this into the master branch. There's nothing stopping us from tightening it up more in the future. If anybody has more stuff that I should look at, please open a pull request or something? thanks, -- Nick *** To unsubscribe

Re: [Libevent-users] Deprecated functions and their replacements

2013-03-28 Thread Grega Kres
es to use. > *** > To unsubscribe, send an e-mail to majord...@freehaven.net with > unsubscribe libevent-usersin the body. ******* To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

Re: [Libevent-users] Simple question about multithreading SSL bufferevents.

2013-03-27 Thread John
You can see the test code at http://pastebin.com/0136vEbe -John - Original Message - From: Mark Ellzey To: libevent-us...@freehaven.net Cc: Sent: Wednesday, March 27, 2013 11:20 AM Subject: Re: [Libevent-users] Simple question about multithreading SSL bufferevents. On Tue, Mar 26

Re: [Libevent-users] Simple question about multithreading SSL bufferevents.

2013-03-27 Thread Mark Ellzey
scribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

Re: [Libevent-users] Deprecated functions and their replacements

2013-03-27 Thread Nick Mathewson
nnection_baes_bufferevent_new would appear to be the ones to use. *** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

Re: [Libevent-users] Simple question about multithreading SSL bufferevents.

2013-03-27 Thread John
essier/Chandra. Thanks, -John - Original Message - From: Mark Ellzey To: libevent-us...@freehaven.net Cc: Sent: Wednesday, March 27, 2013 7:23 AM Subject: Re: [Libevent-users] Simple question about multithreading SSL bufferevents. On Tue, Mar 26, 2013 at 03:32:17PM -0700, John wrote:

Re: [Libevent-users] Simple question about multithreading SSL bufferevents.

2013-03-27 Thread Nick Mathewson
*** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

Re: [Libevent-users] Simple question about multithreading SSL bufferevents.

2013-03-27 Thread Mark Ellzey
talize a set of mutexes and set lock/unlock callbacks via ssl. See https://github.com/ellzey/libevhtp/blob/master/evhtp.c#L3160 as an example. *** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

[Libevent-users] Deprecated functions and their replacements

2013-03-27 Thread Grega Kres
p_connection_new and evhttp_connection_set_base, or should I keep using them for now? BTW, I'm using 2.0.21. Thanks *** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

Re: [Libevent-users] bufferevent read high watermark and missing error/event callback

2013-03-26 Thread Nick Mathewson
ng for reads on it and you're not trying to write on it. Is this implementable? *** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

[Libevent-users] bufferevent read high watermark and missing error/event callback

2013-03-26 Thread Mina Naguib
ignoring "..., 35Got data from client - ignoring it ) = 35 epoll_wait(3, ******* To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

[Libevent-users] Simple question about multithreading SSL bufferevents.

2013-03-26 Thread John
initialization. *** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

Re: [Libevent-users] help about an error message

2013-03-26 Thread sven falempin
ct your events -- but you can still use event_init() and > event_set() like you did before, just so long as you call event_init() > first. > > -- > Nick > *** > To unsubscribe, send an e-mail to majord...@freeha

Re: [Libevent-users] help about an error message

2013-03-26 Thread Nick Mathewson
all event_init() first. -- Nick *** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

Re: [Libevent-users] help about an error message

2013-03-26 Thread sven falempin
o not close the FD i exhaust the files desc > before > > reaching the bug. > > > > -- > > > - > > () ascii ribbon campaign - against html e-mail > > /\ > > > > -- > Respectfully > Azat Khuzhin > Primary email a3at.m...@gmail.com > *** > To unsubscribe, send an e-mail to majord...@freehaven.net with > unsubscribe libevent-usersin the body. > -- - () ascii ribbon campaign - against html e-mail /\

Re: [Libevent-users] help about an error message

2013-03-26 Thread Azat Khuzhin
- > () ascii ribbon campaign - against html e-mail > /\ -- Respectfully Azat Khuzhin Primary email a3at.m...@gmail.com *** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

[Libevent-users] help about an error message

2013-03-25 Thread sven falempin
using libevent2 (libevent-2.0.21-stable) i create this log: [warn] event_del: event has no event_base set. [err] event_assign called on an already added event 0x84de9e4 (events: 0x0, fd: 0, flags: 0x0) using this code: void connection::listen_write_event() { int rc = 0; if (fd == -1) return;

Re: [Libevent-users] WaitForMultipleObjects backend?

2013-03-20 Thread Patrick Pelletier
t yet, but I'm sure a customer will find a way to run into it when we least expect it. Thanks again for the brain dump, and I'll keep you updated if I make any further progress! --Patrick *** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

Re: [Libevent-users] remove some bytes from the end of the evbuffer

2013-03-15 Thread Nick Mathewson
ble some kind of code that would be difficult or annoying to write otherwise? yrs, -- Nick *** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

[Libevent-users] Does anyone here still need support for MSVC prior to 2010?

2013-03-14 Thread Zack Weinberg
probing for, see here: https://www.owlfolio.org/possibly-useful/notes-on-the-cross-platform-availability-of-header-files/ ) zw *** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

Re: [Libevent-users] WaitForMultipleObjects backend?

2013-03-13 Thread Nick Mathewson
* You can max out at 64 events. That's a nonstarter IMO. ** The interface for libevent backends is straightforward but underdocumented. I would be more than happy to answer any questions you have. The shortest backend of general interest is poll.c; the longest is epoll.c. yrs, -- Nick *** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

[Libevent-users] WaitForMultipleObjects backend?

2013-03-13 Thread Patrick Pelletier
** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

Re: [Libevent-users] [PATCH] Add sample/https-client.c, an example of stacking evhttp as a client on top of bufferevent_ssl.

2013-03-13 Thread Alexey Ozeritsky
ST /proxy/ HTTP/1.1", upstream: >> "http://127.0.0.1:8000/proxy/";, host: "localhost" >>  .. >>  nginx access.log: >>  :::127.0.0.1 - - [11/Mar/2013:19:38:15 +0400] "POST /proxy/ HTTP/1.1" >> 200 13 "-" "-"

[Libevent-users] .

2013-03-12 Thread Mattias Hanisch
unsubscribe libevent-users *** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

Re: [Libevent-users] [PATCH] Add sample/https-client.c, an example of stacking evhttp as a client on top of bufferevent_ssl.

2013-03-11 Thread Azat Khuzhin
.. >>> 2013/03/11 19:38:22 [error] 24256#0: *120 sendfile() failed (32: Broken >>> pipe) while sending request to upstream, client: :::127.0.0.1, server: >>> localhost, request: "POST /proxy/ HTTP/1.1", upstream: >>> "http://127.0.0.1:8000/prox

Re: [Libevent-users] [PATCH] Add sample/https-client.c, an example of stacking evhttp as a client on top of bufferevent_ssl.

2013-03-11 Thread Azat Khuzhin
gt; "http://127.0.0.1:8000/proxy/";, host: "localhost" >> .. >> nginx access.log: >> :::127.0.0.1 - - [11/Mar/2013:19:38:15 +0400] "POST /proxy/ HTTP/1.1" >> 200 13 "-" "-" >> :::127.0.0.1 - - [11/Ma

Re: [Libevent-users] [PATCH] Add sample/https-client.c, an example of stacking evhttp as a client on top of bufferevent_ssl.

2013-03-11 Thread Azat Khuzhin
t;;, host: "localhost" > .. > nginx access.log: > :::127.0.0.1 - - [11/Mar/2013:19:38:15 +0400] "POST /proxy/ HTTP/1.1" 200 > 13 "-" "-" > :::127.0.0.1 - - [11/Mar/2013:19:38:22 +0400] "POST /proxy/ HTTP/1.1" 502 > 172 "-" "-" > :::127.0.0.1 - - [11/Mar/2013

Re: [Libevent-users] [PATCH] Add sample/https-client.c, an example of stacking evhttp as a client on top of bufferevent_ssl.

2013-03-11 Thread Oscar Koeroo
On 11-03-13 16:00, Alexey Ozeritsky wrote: > libevent does something wrong: > > $ ./sample/https-client -url https://localhost/proxy -data 4K -ignore-cert > Response line: 200 OK > OK > > $ ./sample/https-client -url https://localhost/proxy -data 512K -ignore-cert > Response line: 502 Bad Gateway

Re: [Libevent-users] [PATCH] Add sample/https-client.c, an example of stacking evhttp as a client on top of bufferevent_ssl.

2013-03-11 Thread Alexey Ozeritsky
access.log: :::127.0.0.1 - - [11/Mar/2013:19:38:15 +0400] "POST /proxy/ HTTP/1.1" 200 13 "-" "-" :::127.0.0.1 - - [11/Mar/2013:19:38:22 +0400] "POST /proxy/ HTTP/1.1" 502 172 "-" "-" :::127.0.0.1 - - [11/Mar/2013:19:39:16 +0400] "POST /proxy/ HTTP/1.1" 400 0 "-" "-" > > Oscar *** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

Re: [Libevent-users] [PATCH] Add sample/https-client.c, an example of stacking evhttp as a client on top of bufferevent_ssl.

2013-03-11 Thread Alexey Ozeritsky
sn't do any certificate validation > so far as I can see, and as such gets zero protection from > man-in-the-middle attacks.  People who don't know how to use TLS will > be copying our examples here, so we need to make sure to get t

Re: [Libevent-users] Creating a repeater/forwarder

2013-03-09 Thread Nick Mathewson
chaos as they all randomly drain it). > What you want sounds kind of like something you could do with evbuffer_add_reference. Or possibly you want the new function in libevent 2.1-alpha, evbuffer_add_buffer_reference. best wishes, -- Nick *** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

[Libevent-users] Creating a repeater/forwarder

2013-03-09 Thread Oliver Smith
I'm trying to create a fairly low overhead repeater process which will accept N connections (where N is going to be relatively small, in the area of 5-12) connections from other processes and which will forward incoming packets from one connection to all of the others. conn1 --'hello'--> repeater

[Libevent-users] Certificate validation problem when using libevent

2013-03-08 Thread Björn K .
bev, dns_base, AF_UNSPEC, "www.google.com", 443); event_base_dispatch(base); return 0; } ******* To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

Re: [Libevent-users] [PATCH] Add sample/https-client.c, an example of stacking evhttp as a client on top of bufferevent_ssl.

2013-03-07 Thread Patrick Pelletier
de? --Patrick *** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

[Libevent-users] libpropeller - high level multithreaded library built with libevent

2013-03-07 Thread Sergey Zavadski
For some time now I have been working on libpropeller - https://github.com/sergeyzavadski/libpropeller. It is a high level multi threaded library, that has full HTTP support (but is possible to build custom TCP servers as well). It is written in C++ and using libevent's bufferevents as the founda

Re: [Libevent-users] [PATCH] Add sample/https-client.c, an example of stacking evhttp as a client on top of bufferevent_ssl.

2013-03-07 Thread Nick Mathewson
ull request for this branch: > > https://github.com/libevent/libevent/pull/47 Thanks! Is there no way to do this *without* importing a big pile of code from curl? That seems kinda extreme. -- Nick *** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

Re: [Libevent-users] [PATCH] Add sample/https-client.c, an example of stacking evhttp as a client on top of bufferevent_ssl.

2013-03-06 Thread Patrick Pelletier
re hasn't been any further discussion of this on the mailing list, I've decided to go ahead and submit a pull request for this branch: https://github.com/libevent/libevent/pull/47 --Patrick *** To unsubscribe, send an e

[Libevent-users] Freeing a closed persistent evhttp_connection

2013-03-04 Thread Mukul Majmudar
Hello, Where do I free a persistent evhttp_connection after it has been closed? In my code, I have a cache of evhttp_connections to possibly different hosts. These connections are reused for multiple requests to the same hosts. At some point, these hosts may send back a "Connection: close" header

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

2013-02-28 Thread Zack Weinberg
the event object, and is about to incref it when thread 1 deallocates it. zw *** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

Re: [Libevent-users] IDN support for http client/server

2013-02-28 Thread Mark Ellzey
teresting to see. Though, support using libidn isn't going to happen in libevent itself since it's licensed under the GPL. *** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

Re: [Libevent-users] [PATCH] Add sample/https-client.c, an example of stacking evhttp as a client on top of bufferevent_ssl.

2013-02-27 Thread Patrick Pelletier
l_hostname_validation.c | 168 + sample/openssl_hostname_validation.h | 56 ++ 7 files changed, 816 insertions(+), 1 deletions(-) create mode 100644 sample/hostcheck.c create mode 100644 sample/hostcheck.h create mode 100644 sample/https-client.c create mode 100644 sample/openssl

Re: [Libevent-users] [PATCH] Add sample/https-client.c, an example of stacking evhttp as a client on top of bufferevent_ssl.

2013-02-27 Thread Jardel Weyrich
On Wed, Feb 27, 2013 at 11:13 PM, Patrick Pelletier wrote: > On 02/20/2013 07:26 PM, Jardel Weyrich wrote: > > There's X509_check_host for that, but I'm really not sure whether it's >> enough or not. >> > > Please correct me if I'm mistaken, but my impression is that > X509_check_host only exists

Re: [Libevent-users] [PATCH] Add sample/https-client.c, an example of stacking evhttp as a client on top of bufferevent_ssl.

2013-02-27 Thread Patrick Pelletier
ially being too feeble of an attempt to be worth keeping. --Patrick *** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

Re: [Libevent-users] random crashed by [err] event_queue_remove:not on queue 8

2013-02-26 Thread Nick Mathewson
ion *** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

Re: [Libevent-users] random crashed by [err] event_queue_remove:not on queue 8

2013-02-24 Thread Tony Qin
; > event_enable_debug_mode() -- see > http://www.wangafu.net/~nickm/libevent-book/Ref1_libsetup.html > > Also, try running with the latest 2.0.x-stable version maybe. Also, > consider running under valgrind. > ******* > To

Re: [Libevent-users] [PATCH] Add sample/https-client.c, an example of stacking evhttp as a client on top of bufferevent_ssl.

2013-02-21 Thread Nick Mathewson
Chromium used NSS? [...] > AFAIK, it has no callback support for this kind of "automatic error > reporting", except for SSL_set_info_callback, which sets a callback to > report errors and state changes for a given SSL connection. FWIW, Tor uses > it (see src/common/tortls.c). Yeah, I wrote that code. I wouldn't recommend SSL_set_info_callback, though: it is a huge can of worms. -- Nick *** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

Re: [Libevent-users] random crashed by [err] event_queue_remove:not on queue 8

2013-02-21 Thread Nick Mathewson
n maybe. Also, consider running under valgrind. *** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

Re: [Libevent-users] [PATCH] Add sample/https-client.c, an example of stacking evhttp as a client on top of bufferevent_ssl.

2013-02-20 Thread Jardel Weyrich
On Wed, Feb 20, 2013 at 9:03 PM, Nick Mathewson wrote: > On Wed, Feb 20, 2013 at 12:42 PM, Catalin Patulea > wrote: > > On Tue, Feb 19, 2013 at 9:40 PM, Jardel Weyrich > wrote: > >> 2) Call SSL_CTX_load_verify_locations passing the path of the CA > >> certificates installed by the aforementione

Re: [Libevent-users] [PATCH] Add sample/https-client.c, an example of stacking evhttp as a client on top of bufferevent_ssl.

2013-02-20 Thread Nick Mathewson
alls unless > necessary? I don't know of an API like that in openssl. (Anybody?) -- Nick *** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

Re: [Libevent-users] [PATCH] Add sample/https-client.c, an example of stacking evhttp as a client on top of bufferevent_ssl.

2013-02-20 Thread Catalin Patulea
rors after the fact (ERR_get_error, ERR_print_error, etc.) but I would prefer not to clutter the sample with those calls unless necessary? *** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

Re: [Libevent-users] random crashed by [err] event_queue_remove:not on queue 8

2013-02-19 Thread Tony Qin
debug_mode_on = 1; *** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

Re: [Libevent-users] [PATCH] Add sample/https-client.c, an example of stacking evhttp as a client on top of bufferevent_ssl.

2013-02-19 Thread Jardel Weyrich
On Tue, Feb 19, 2013 at 7:07 PM, Catalin Patulea wrote: > On Tue, Feb 19, 2013 at 3:05 PM, Nick Mathewson > wrote: > >* It could sure use comments! > Can you be more specific? This all feels like a lot of boilerplate to > me. Parse the URL, initialize OpenSSL, create some bufferevents. I'm >

Re: [Libevent-users] [PATCH] Add sample/https-client.c, an example of stacking evhttp as a client on top of bufferevent_ssl.

2013-02-19 Thread Catalin Patulea
whether I need to do this myself - any idea? *** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

Re: [Libevent-users] Re: [PATCH] http: on connection reset, detach the closed fd from the bufferevent

2013-02-19 Thread Catalin Patulea
> bufferevent_getfd(evcon->bufev)? > >> How does the attached patch look to you? Does it work as well/any better? > I'll see about canarying it and will reply once it's been running for a while. ******* To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

Re: [Libevent-users] Re: [PATCH] http: on connection reset, detach the closed fd from the bufferevent

2013-02-19 Thread Catalin Patulea
nce it's been running for a while. *** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

Re: [Libevent-users] Re: [PATCH] http: on connection reset, detach the closed fd from the bufferevent

2013-02-19 Thread Nick Mathewson
On Tue, Feb 19, 2013 at 11:57 AM, Catalin Patulea wrote: > On Tue, Feb 19, 2013 at 11:49 AM, Nick Mathewson wrote: >> Could you be more specific about the good results, and how to >> reproduce them? Or how to reproduce/observe the undesired behavior? >> It would also be good to have an explanati

Re: [Libevent-users] use windows threads leak

2013-02-19 Thread Nick Mathewson
tdown(). In Libevent 2.0, though, you shouldn't have to worry too hard about these leaks: they're library-global, not something that can grow unbound. *** To unsubscribe, send an e-mail to majord...@freehaven.net wit

Re: [Libevent-users] [PATCH] Add sample/https-client.c, an example of stacking evhttp as a client on top of bufferevent_ssl.

2013-02-19 Thread Nick Mathewson
nybody decides that reading le-proxy.c is a substitute for learning the OpenSSL API and shoots themselves in the foot. :p -- Nick *** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

Re: [Libevent-users] [PATCH] Add sample/https-client.c, an example of stacking evhttp as a client on top of bufferevent_ssl.

2013-02-19 Thread Nick Mathewson
so we need to make sure to get the security right. *** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

[Libevent-users] use windows threads leak

2013-02-19 Thread Brett Harrison
I am using 2.0.21-stable on windows. When shutting down the server I get 3 memory leaks (see below). Is there a clean function I should be calling when using windows threads? WARNING: Visual Leak Detector detected memory leaks! -- Block 5344 at 0x01FE0040: 40 bytes -- Lea

[Libevent-users] [PATCH] Add sample/https-client.c, an example of stacking evhttp as a client on top of bufferevent_ssl.

2013-02-19 Thread Catalin Patulea
y.c sample_le_proxy_LDADD = libevent.la libevent_openssl.la -lssl -lcrypto ${OPENSSL_LIBADD} sample_le_proxy_INCLUDES = $(OPENSSL_INCS) + +SAMPLES += sample/https-client +sample_https_client_SOURCES = sample/https-client.c +sample_https_client_LDADD = libevent.la libevent_openssl.la -lssl -lcrypto ${OPENSSL_LIBADD} +sample_https_client_INCLUDES = $(OPENSSL_INCS) endif noinst_PROGRAMS += $(SAMPLES) -- 1.8.1.3 *** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

Re: [Libevent-users] Re: [PATCH] http: on connection reset, detach the closed fd from the bufferevent

2013-02-19 Thread Catalin Patulea
ions. We saw a 7-fold reduction in crash rate with this patch. *** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

Re: [Libevent-users] Re: [PATCH] http: on connection reset, detach the closed fd from the bufferevent

2013-02-19 Thread Nick Mathewson
o unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

[Libevent-users] Re: [PATCH] http: on connection reset, detach the closed fd from the bufferevent

2013-02-19 Thread Catalin Patulea
> *evcon) > tmp = bufferevent_get_input(evcon->bufev); > evbuffer_drain(tmp, evbuffer_get_length(tmp)); > > + bufferevent_setfd(evcon->bufev, -1); > evcon->state = EVCON_DISCONNECTED; > } > > -- > 1.7.7.3 > ******

Re: [Libevent-users] random crashed by [err] event_queue_remove:not on queue 8

2013-02-19 Thread Nick Mathewson
To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

Re: [Libevent-users] random crashed by [err] event_queue_remove:not on queue 8

2013-02-18 Thread Tony Qin
gt; strange happens to it before it crashes your program. > > Best of luck, > -- > Nick > *** > To unsubscribe, send an e-mail to majord...@freehaven.net with > unsubscribe libevent-usersin the body. *** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

Re: [Libevent-users] Deep recursive call of bufferevent write callback when openssl is in use

2013-02-18 Thread Nick Mathewson
LLBACKS flags become generally unneeded, and can be replaced by an "avoid reentrant callback invocation" mechanism. -- Nick *** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

  1   2   3   4   5   6   7   8   9   10   >