Greetings,
Attached is a small patch which allows a user to grab the underlying
event_base from an evhttp_request. I have patched this against the
current master on github.
If there is a better way to do this, I am open to suggestions.
Thanks in advance!
http.c|9 +
This is an odd question that hopefully someone can help me out with. I
have a function right now that looks a bit like this:
void
read_data(struct bufferevent *bev, void *args) {
evbuffer *data;
data = bufferevent_get_input(bev)
if (evbuffer_get_length(data) < some_size) {
On Thu, Aug 05, 2010 at 02:09:50PM -0400, Nick Mathewson wrote:
> Right. The read callback is invoked when more data *arrives,* not
> whenever there is data.
>
> If you want it to handle all the data, why not just use a loop:
>
>while (evbuffer_get_length(data) >= some_size) {
>/* ..
On Sun, Aug 29, 2010 at 08:08:12AM -0700, Gilad Benjamini wrote:
> My eventloop needs to go through this cycle
>- Read 16 bytes off the network
>- The 16 bytes contain a length parameter
>- Read additional "length" bytes from the network.
>
> It seems that this can be done with a buffe
On Wed, Sep 01, 2010 at 10:06:44AM -0700, Gilad Benjamini wrote:
> Your sample code did not include the watermark part.
It doesn't need to.
> May I assume that at the end of the code snippet you would set the low
> watermark ?
No.
> If I set the low watermark to X, am I guaranteed that the next
On Fri, Sep 17, 2010 at 10:29:08AM -0400, Nick Mathewson wrote:
> On Fri, Sep 17, 2010 at 5:22 AM, Mihai Draghicioiu
> wrote:
> [...]
> > Core was generated by `/home/mihai/frogmod-justice/frogserv'.
> > Program terminated with signal 11, Segmentation fault.
> > [New process 14829]
> > #0 ?evhttp_
On Sat, Nov 06, 2010 at 12:07:32PM -0400, Ron Parker wrote:
> Basile,
>
> It was my experience with libevent 1.4 that the entire post was buffered
> prior to callback. At a very minimum this opened my system up to a DOS
> attack. Since I didn't find a way to get incremental callbacks in the end
On Tue, Nov 16, 2010 at 10:26:59AM -0600, Steven Veneralle wrote:
> whenever I did my make I got he following
> /sizes: error while loading shared libraries: libevent-1.4.so.2: cannot open
> shared object file: No such file or directory
> make: *** [test] Error 127
>
> abd this error after it trie
On Sat, Dec 18, 2010 at 08:31:23PM -0500, Kevin Bowling wrote:
> One of the ideas I saw floating around for libevent 2.1 was threaded event
> bases to ease thread pool programming.
>
> This seems like a pretty challenging project and probably beyond my
> abilities at the moment but if we can hash
On Mon, Dec 20, 2010 at 01:32:50AM -0500, Kevin Bowling wrote:
> I'm at wit's end with a libevent threading bug. As part of a disconnect
> client routine, I manually call the errorcb with EVENT_ERROR_EOF. The idea
> was to keep all the cleanup code in one callback but I'm beginning to think
> thi
On Tue, Dec 21, 2010 at 11:02:25AM -0500, Evan Jones wrote:
> You can do this with libevent 2.0, using thread-safe event loops,
> and using event_active() to "trigger" an event to be run in another
> thread.
I've never had much luck with event_active across multiple threads,
though this may be bec
On Tue, Apr 26, 2011 at 10:49:46AM -0700, Cliff Frey wrote:
> Also, a completely different bug: ?If you want to support potentially
> infinite POST streams from clients (imagine that you wanted to
> implement word-count as an http server, where they POST a document,
> and you return the word count)
On Sat, May 07, 2011 at 01:07:40AM -0400, Nick Mathewson wrote:
> *lots of text here*
One of the ways nginx deals with very large streams of data is to
actually spool the data to file. By default this is turned off. But
this may be a simple solution to all of these problems.
The spooling is tra
I think it may this may be a good time for Cliff, Vector, Scott,
myself, and input/time from Nick to give a shot creating a
secondary http API (keeping the old one in place).
This thread has been full of good ideas and experimental
implementations. A call to arms?
***
On Tue, May 10, 2011 at 09:04:42AM +0200, Roman Puls wrote:
> whilst this might be nice for flow-blown web services, this does not
> work for embedded systems that have no or very limited disk storage.
>
> Also, this pattern disables effective stream handling, e.g. where
> you don't want to store
On Tue, May 10, 2011 at 04:14:42PM -0700, Scott Lamb wrote:
> It occurs to me by "install a handler for" you might be meaning a
> custom filesystem via kernel module or FUSE or something. I don't like
> that either;
I never said nor implied such a thing.
**
On Tue, May 10, 2011 at 04:04:27PM -0700, Scott Lamb wrote:
> I don't see the point in libevent implementing spooling to a file
> (descriptor). If an application wants that, it can implement it on top
> of the existing evhttp_request_set_chunked_cb + the fairly small
> patches being proposed (call
I just whipped up a quick bare-bones http server using only bufferevents
and a MIT licensed http parser (which if I am not mistaken - is
compatible with bsd).
https://github.com/ellzey/bufferevent_http_parser/blob/master/evhttp.c
This is the type of control I would look for in a http request pro
On Wed, May 11, 2011 at 04:20:33AM -0700, Scott Lamb wrote:
> It's libevent's doom, too: the extra code for spooling is a
> maintenance burden. I don't like options C or D.
>
I am officially out of this thread. This back and forth has obviously
derailed with reasons-why-not instead of how-about-w
I have created a new project called libevhtp, a server-only replacement
for the current libevent http API. The API utilizes a streaming http
parser, which allows me to hook into a lot of places.
You can treat the API just like you would normal evhttp_* calls, but
instead use evhtp_*.
The flexibil
On Sun, May 15, 2011 at 06:24:02PM +0800, lx wrote:
> i'll try to use it.
>
Thanks,
I just pushed a bunch of chances including a few more hook mechanisms. A
more refined 1.0 vs 1.1 compatability set. Some initial perf testing
with httperf comparing test.c (from libevhtp) and http_bench (from
l
> On Mon, May 16, 2011 at 10:30 PM, Mark Ellzey wrote:
> Are you the copyright holder? If so, why not stick to BSD to keep
> things simple.
>
> Kevin
As an FYI, Libevent already does a good job of keeping track of all
non-BSD specific code in their LICENCE file.
But
On Wed, May 25, 2011 at 11:11:49PM +0200, Aleksandar Lazic wrote:
> Dear Mark,
>
> What do you think about to use the mongrel2 parser?
>
> https://github.com/zedshaw/mongrel2
>
> => mongrel2/src/http11
The general arch seems to be completely derived from ry (backend structs
look pretty much the
On Thu, Jun 30, 2011 at 05:13:05PM -0700, Kun Xi wrote:
> I once played with libevent using cmake and msys. It is really fun:
> - free and familiar toolchain: gcc, gdb
> - portability
> - cross-compiling from linux host
>
> cmake can generate NMAKE makefile. I have never tried to use Visual
> C
On Thu, Jun 30, 2011 at 01:53:12PM -0400, Ed Day wrote:
> I then went into the event dispatch loop and immediately fell out the bottom.
>
> Is this not the correct way to use these events?
>
What does "fell out the bottom" mean?
*
On Fri, Jul 01, 2011 at 11:51:28AM -0400, Ed Day wrote:
> By "fell out the bottom" I mean returned immediately.
>
> Ed
>
>
Correct, if there are no events in a base, the loop terminates. Normally
you use them in situations where you have other things going on. I am
assuming this is derived via
On Wed, Jul 06, 2011 at 07:04:51PM +0200, mosta wrote:
> hi,
>
> is there a API for over taking the message loop?
Can you clarify what you mean by "message loop"?
***
To unsubscribe, send an e-mail to majord...@freehaven.net with
On Wed, Jul 06, 2011 at 08:01:11PM +0200, mosta wrote:
> On 07/06/11 19:39, Mark Ellzey wrote:
> > Can you clarify what you mean by "message loop"?
> I mean the event base loop.
Can you clarify what yo
On Wed, Jul 06, 2011 at 10:23:57PM +0200, mosta wrote:
> That I run the main loop and call a function that handles what's
> happening in the event base loop.
If I grok this correctly, you are asking whether you can get a list of
currently active events in an event_base?
***
On Mon, Jul 11, 2011 at 10:35:46AM +0200, Andrei Chirila wrote:
> Hello,
>
> I'm using libevent in some programs and I came across a memory leak in
> libevent. I'm wondering if I'm the one doing something wrong or it's really
> something in libevent.
>
What version are you using? I just browsed
On Mon, Jul 11, 2011 at 10:55:16AM -0500, Mark Ellzey wrote:
> On Mon, Jul 11, 2011 at 10:35:46AM +0200, Andrei Chirila wrote:
> > Hello,
> >
> > I'm using libevent in some programs and I came across a memory leak in
> > libevent. I'm wondering if I'm th
Ah, this is a global lock.
Unfortunately there doesn't seem to be a way to free that, is it a big
issue? this is small, one time allocat, and handled by dtor's.
***
To unsubscribe, send an e-mail to majord...@freehaven.net with
On Mon, Jul 11, 2011 at 06:06:22PM +0200, Andrei Chirila wrote:
> Hello,
>
> I just tried with the latest:
>
Try compiling with --disable-debug-mode
***
To unsubscribe, send an e-mail to majord...@freehaven.net with
unsubscribe
int
event_global_setup_locks_(const int enable_locks)
{
#ifndef _EVENT_DISABLE_DEBUG_MODE
EVTHREAD_SETUP_GLOBAL_LOCK(_event_debug_map_lock, 0);
#endif
is your issue. so yeah, --disable-debug-mode will fix that problem.
On Mon, Jul 11, 2011 at 11:26:28AM -0500, Mark Ellzey wrote:
> On
Yeah I see it now - not a huge issue but I will submit a patch here
soon.
***
To unsubscribe, send an e-mail to majord...@freehaven.net with
unsubscribe libevent-usersin the body.
rote:
> Hi Mark,
>
> Thank you for your interest in this issue.
>
> Best regards,
> Andrei
>
> On Mon, Jul 11, 2011 at 7:33 PM, Mark Ellzey wrote:
>
> > Yeah I see it now - not a huge is
On Tue, Jul 12, 2011 at 12:20:16AM -0400, Nick Mathewson wrote:
> On Mon, Jul 11, 2011 at 2:40 PM, Mark Ellzey wrote:
> Looks like a good start; see the comments on your pull request.
Updated per request.
***
To unsub
On Wed, Aug 10, 2011 at 04:56:27PM +0400, Leonid Evdokimov wrote:
> + } else if (reply && !reply->have_answer) {
> + error = DNS_ERR_NOANSWER;
> + } else {
> + error = DNS_ERR_UNKNOWN;
> }
There is an odd edge-case in dns. DNS_E
On Wed, Aug 10, 2011 at 07:39:02PM +0400, Leonid Evdokimov wrote:
> evhttp_parse_query and evhttp_parse_query_str require preallocated
> struct evkeyvalq that has unstable ABI according to section 2.1 of
> whatsnew-2.0.txt
>
> But these functions are placed in "stable ABI" header event2/http.h
>
On Thu, Aug 11, 2011 at 09:19:41PM +0300, about bus wrote:
> Hello!
>
> I have a simple my own libevent-based http server written on C, use evhttp.h
> functions.
> I use it like backend with nginx server (about ~2K requests per second).
> Sometimes in nginx error log appears error: "(60: Operation
On Fri, Aug 12, 2011 at 06:36:18PM +0300, about bus wrote:
> On Fri, Aug 12, 2011 at 4:57 PM, Leonid Evdokimov wrote:
>
> > What libevent version do you use?
> > Can you reproduce the issue with ab (apache benchmark) instead of nginx?
> >
> > --
> >
>
> Libevent from sources: libevent-2.0.12-sta
On Fri, Aug 12, 2011 at 09:48:20PM +0300, about bus wrote:
> I've added some debug output in libevent functions, added "fd" (file
> descriptor) in every output message.
> messages from libevent - [warn]
> messages from my http server - v[3]
> Also I've changed timeout in nginx config from 75 to 30,
On Sun, Aug 14, 2011 at 04:15:10PM +0300, about bus wrote:
> I've checked this, domain name resolution does not take much time.
> Issue somewhere between end of evhttp_socket_cb and start of evhttp_read_cb
> functions calls.
>
> 2011.08.14 16:52:27 [warn] === evhttp_socket_cb: fd: 131
> 2011.08.1
On Tue, Aug 16, 2011 at 12:28:21PM +0300, about bus wrote:
> No, I don't, because they output very huge, and I don't know what exactly I
> should looking there.
I think I have missed asking some basic questions.
- What version of libevent are you using?
- What operating system and event backend
On Mon, Aug 15, 2011 at 01:53:18PM +0300, about bus wrote:
> Http server use only libevent http functions for network communication.
>
> evthread_use_pthreads;
So the webserver is threaded?
> event_base_new
> evhttp_new
> evhttp_set_gencb
> evhttp_bind_socket
> while (1) {
>event_base_loop
>
On Tue, Aug 16, 2011 at 09:47:07AM -0500, Mark Ellzey wrote:
> On Tue, Aug 16, 2011 at 12:28:21PM +0300, about bus wrote:
> > No, I don't, because they output very huge, and I don't know what exactly I
> > should looking there.
>
> I think I have missed asking som
On Tue, Aug 16, 2011 at 05:59:19PM +0300, about bus wrote:
> I've added debug output to next libevent functions:
> * event_add - add file descriptor to kqueue for monitoring network activity.
> * kq_dispatch - return file descriptor when event appeared on it.
>
> ### Previous request which used th
On Tue, Aug 16, 2011 at 06:24:08PM +0300, about bus wrote:
> On Tue, Aug 16, 2011 at 6:08 PM, Mark Ellzey wrote:
>
> > OK, this makes sense. there have been issues with kqueue being broken on
> > older
> > versions of libevent (a while back, with 1.x), try falling ba
On Fri, Aug 19, 2011 at 03:14:12PM +0400, Leonid Evdokimov wrote:
> From a87fc928f7a61ca691861154ffd9ba3e6aec0397 Mon Sep 17 00:00:00 2001
> From: Leonid Evdokimov
> Date: Fri, 19 Aug 2011 14:47:20 +0400
> Subject: [PATCH 6/6] Add Host header in HTTP/1.1 requests if it's missing.
>
> ---
> http.
On Tue, Aug 30, 2011 at 09:56:01PM +0200, Graham Leggett wrote:
> Hi all,
>
> I have seen mention of support for https from within libevent, but
> I'm struggling to find details of where to find it. Is there any
> example code anywhere to show how one might support such a thing?
>
There is no di
On Wed, Aug 31, 2011 at 09:00:17PM +0800, lx wrote:
> hello, i'm a new one , begin to use libevent. i've installed it in ubuntu10.
>
> by ./configure, make , sudo make install.
> but when i complie a example, it can't work.* the errors is:*
>
> ---
On Tue, Aug 30, 2011 at 05:54:42PM -0400, Nick Mathewson wrote:
> Neat! APIwise, is there also a way to just pass in an SSL_CTX or use
> a factory function to create SSL objects? This kind of "config
> structure" trick is neat, but a lot of time, I need to do some pretty
> heavy unanticipated SS
On Wed, Aug 31, 2011 at 07:28:59PM -0700, William Ahern wrote:
> FWIW, the PostgreSQL C client API works non-blocking. It's quite well
> designed.
>
I wrote this years ago so mind the crappy code (not to mention pre
levent2), but it's a good example of how to use libevent + nonblocking
pgsql.
h
On Thu, Sep 01, 2011 at 11:34:11AM -0500, Nulik Nol wrote:
> But ... I think it is over for me with SQL type databases. There is a
> big movement going on on non-relational databases and I think it is
> time to change.
Most if not all (widely used) relational databases these days expose some type
On Fri, Sep 02, 2011 at 10:52:17AM -0500, Nulik Nol wrote:
> >
> > Crap, I just realized this is completely off topic - but my main point
> > is to gather requirements, and make a determination if you're willing to
> > risk flexibility for possible bumps in performance. Or just abstract the
> > fra
On Wed, Sep 07, 2011 at 10:22:15PM +1000, Jim Tink wrote:
> Could someone provide a small overview on how libevent supports these? IE Is
> it based on the operating system or context of when an event is created or
> something like that? Is it something that I would control as a developer
> etc?
Th
> Nonblocking I/O has not much to do with it, you don't necessarily need
> nonblocking I/O if you have working poll(2) or select(2).
>
> It is a limitation of OS X. Every other platform with kqueue(2) and all
> I am aware of with poll(2) support it on all file descriptors. OS X
> doesn't support i
On Mon, Oct 03, 2011 at 11:59:58AM +0200, Micha? Kr?l wrote:
> Hi,
>
> I'm writing distributed application using the newest version of libevent
> (2.0.14). To read and write from/to sockets I use recv,send statement and it
> works perfectly. Now I want to use SSL support provided by libevent. In
>
On Mon, Nov 14, 2011 at 11:03:58AM -0800, Catalin Patulea wrote:
> Hi,
>
> Why does bev_ssl require deferred callbacks?
>
As far as I know, it doesn't. But I wrote this patch because if you are
using a deferred bev with bulk incoming data, it never drops back into
base_loop() until SSL_read() sa
On Mon, Nov 14, 2011 at 02:30:32PM -0800, Catalin Patulea wrote:
> This is actually causing an assert in my case :( The key is to get
> SSL_read to return both data (> 0) and EOF (= 0) within the same
> iteration of that (former) while loop. Then the flow looks like this:
>
> SSL_read() returns N
On Mon, Nov 14, 2011 at 07:13:39PM -0600, Mark Ellzey wrote:
>
> We cannot schedule or call the readcb UNTIL SSL_read() returns > 0 OR an
> error occurs on the socket.
I definitely feel confident this is the issue, going into that loop
provided ample time for SSL_read() to proce
On Mon, Nov 14, 2011 at 07:21:00PM -0600, Mark Ellzey wrote:
> On Mon, Nov 14, 2011 at 07:13:39PM -0600, Mark Ellzey wrote:
> >
> > We cannot schedule or call the readcb UNTIL SSL_read() returns > 0 OR an
> > error occurs on the socket.
>
> I definitely feel conf
On Tue, Nov 15, 2011 at 10:48:10AM -0600, Mark Ellzey wrote:
> On Mon, Nov 14, 2011 at 07:21:00PM -0600, Mark Ellzey wrote:
> > On Mon, Nov 14, 2011 at 07:13:39PM -0600, Mark Ellzey wrote:
> > >
> > > We cannot schedule or call the readcb UNTIL SSL_read() returns >
On Fri, Nov 18, 2011 at 05:51:07PM -0800, Rich Onyon wrote:
> I dont see any content?
>
>
> Sent from my Verizon Wireless Device
Probably because you were reading from a verizon wireless device.
***
To unsubscribe, send an e-mai
On Tue, Nov 29, 2011 at 06:58:15AM -0800, Ivan Popovski wrote:
> Hi.
>
> Sorry on newbie question.
>
> Is there way to pause read callback, because i have fixed length buffer?
> and in one moment need to avoid overflow and stop readcb until other
> module consumes data (or other conditions are me
Would you mind submitting the patch branched against patches-2.0 on github?
Easier to pull in / comment / test.
On Mon, Dec 12, 2011 at 11:57:17AM -0800, Myk Taylor wrote:
> >I've written up a patch that allows evhttp to work for HTTPS where a
> >second (or further) request is sent on a evhttp_co
On Mon, Dec 19, 2011 at 05:45:51PM -0500, Catalin Patulea wrote:
> > Ps - I haven't tried to reproduce this bug in a stand alone project yet.
> Would you be able to provide a repro, or at least some more in-depth
> description of the conditions that prompted the issue to surface?
I think I have b
On Mon, Dec 19, 2011 at 07:34:50PM -0600, Mark Ellzey wrote:
> I think I have been able to reproduce this using ssl client + filters.
> More on this in a bit.
This seems to fix the issue:
- n_to_read = SSL_pending(bev_ssl->ssl);
+ if (!(n_to_read = SS
On Mon, Dec 19, 2011 at 07:34:50PM -0600, Mark Ellzey wrote:
> I think I have been able to reproduce this using ssl client + filters.
> More on this in a bit.
I reproduced by running: sample/le-proxy -s 127.0.0.1:8080 127.0.0.1:443
where the 443 host is a https server. Made a 2GB POST, w
On Mon, Dec 19, 2011 at 09:57:08PM -0500, Nick Mathewson wrote:
> I agree with the part of your fix where we don't ignore the extra data
> whose presence is indicated by a nonzero SSL_pending.
>
> But I think these fixes all have some problem(s) in common: They
> ignore the reason for the logic
On Thu, Dec 22, 2011 at 01:33:28PM +0500, Haseeb Abdul Qadir wrote:
> What you guys mean when you say 'build correct infrastructure'? Does it mean
> the ability to schedule callbacks and guarantee that callbacks will called in
> the order they've been queued? For example a timer callback with a t
On Fri, Jan 13, 2012 at 07:13:09PM -0600, Amarin Phaosawasdi wrote:
> Hi Oscar,
>
> Thanks for following up.
>
> We tried building and linking with the same versions of libevent, libevhtp
> as static libraries, and openssl as a shared library as you did on our
> Linux machines and still got the s
On Sun, Jan 15, 2012 at 09:28:23PM -0600, Hochhaus, Andrew wrote:
> I modified Amarin's test program to call evthread_use_pthreads()
> [attached]. I also added BEV_OPT_THREADSAFE to the
> bufferevent_openssl_socket_new/bufferevent_socket_new calls in
> evhtp.c.
>
> This improves things, however, I
On Fri, Feb 24, 2012 at 07:14:58PM -0600, Amarin Phaosawasdi wrote:
> Hello,
>
> About a year ago, there was a thread about deadlocking in
> bufferevent_openssl in multi-threaded mode (
> http://archives.seul.org/libevent/users/Jan-2011/msg00019.html).
>
> We've run into the same problem.
>
Her
On Fri, Feb 24, 2012 at 07:39:26PM -0600, Mark Ellzey wrote:
> On Fri, Feb 24, 2012 at 07:14:58PM -0600, Amarin Phaosawasdi wrote:
> > Hello,
> >
> > About a year ago, there was a thread about deadlocking in
> > bufferevent_openssl in multi-threaded mode (
> >
On Thu, Mar 08, 2012 at 09:39:23PM +0400, Alexey Ozeritsky wrote:
> Hello,
>
> I cannot get https client working.
> I have tried 2 servers (apache2 and nginx).
>
> libevent 2.0.17+ssl-patches and current git version give the same result.
>
> nginx access_log:
> 127.0.0.1 - - [08/Mar/2012:21:08:3
On Thu, Mar 22, 2012 at 07:11:01PM -0300, William Lima wrote:
> Hi!
>
> I'm using bufferevent in my proxy project and I have a bug. The entire
> program is single-thread, but apparently the error callback can be called
> while something is still running (ie. a parser) into server/client read
> cal
On Thu, Mar 22, 2012 at 08:18:21PM -0500, Mark Ellzey wrote:
> On Thu, Mar 22, 2012 at 07:11:01PM -0300, William Lima wrote:
> > Hi!
> >
> > I'm using bufferevent in my proxy project and I have a bug. The entire
> > program is single-thread, but apparently
Greetings all,
I have recently come across a pretty nasty issue using the
bufferevent_openssl API where my read callback would be executed more
than once, even if I had disabled reading. This is an edge-case bug which
can be triggered under the following conditions:
01. bufferevent_enable(ssl_b
On Mon, Apr 23, 2012 at 09:04:59AM -0400, Mansour Moufid wrote:
> Hi,
>
> Here's a patch to adhere to a few of the integer-related recommendations in
> the CERT C Secure Coding Standard. I tried not to break anything but you may
> want to double-check.
>
> Mansour
>
It seems as if the tool be
Today, my employer is making available a highly efficient reverse HTTP(S) proxy
called simply 'RProxy'. This project is being released open-source to encourage
the general community to participate in its evolution.
My employer always avoids trying to re-invent the wheel when it comes to
software,
On Mon, May 21, 2012 at 06:56:22PM +0200, Vincent Bernat wrote:
> Did you try haproxy + stunnel or haproxy + stud? Your project seems
> pretty interesting. I plan to benchmark it against other HTTP SSL
> termination solutions.
We tried on these and many others. They have their upsides
On Wed, May 30, 2012 at 09:36:07AM +0500, Shahid wrote:
> We have tried some use cases and found out that it is due to the fact that
> we are holding the requests to send the response when available. The default
> holding time is 60 seconds after that we send a TIMEOUT response.
>
> These kind of
On Thu, May 31, 2012 at 06:32:38AM -0700, Alap Kumar Sinha wrote:
> Hi,
>
> Any help on this please?
>
> Regards,
> Alap
>
Can you either put this up on pastebin/gist, or make the code an
attachment? You are using a non-plaintext encoding so it's kind of hard
to read.
*
On Thu, May 31, 2012 at 06:48:32AM -0700, Alap Kumar Sinha wrote:
> Hi,
>
> I have attached code snippet. Please let me know if it is better now.
>
> Regards,
> Alap
>
Use evthread_use_pthreads() before anything else and compile with
-levent_pthreads. You cannot use events across different threa
On Wed, Jun 13, 2012 at 10:39:01PM +0800, zhengfish wrote:
> Hi, all
> I want to shape the read/write traffic, I check the data-structure
> I find there are 4 members in the struct bufferevent which maybe do
> that function.
> However I don't know how to do it in detail steps.
> Any
On Wed, Jun 27, 2012 at 11:02:04AM -0700, Julian Bui wrote:
> Hi libevent,
>
> Sorry for the recent surge of emails. I am trying to determine the cause
> of a problem in my application while using evhttp. I wrote a toy/dummy
> server (whose code I included) that exhibits the same problem that my
On Wed, Jun 27, 2012 at 02:37:22PM -0500, Mark Ellzey wrote:
> On Wed, Jun 27, 2012 at 11:02:04AM -0700, Julian Bui wrote:
> > Hi libevent,
> >
> > Sorry for the recent surge of emails. I am trying to determine the cause
> > of a problem in my application while using e
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 and put it on github:
> https://github.com/fancycode/Libevent/blob/buf
On Fri, Sep 21, 2012 at 09:25:43PM +0200, Julian Scheel wrote:
> Hi,
>
> I wonder if there is a way to drain the internal buffer of a bufferevent?
> Actually I use a bufferevent to write data into a socket. But it can happen
> that the socket is not accepting data for a while, which obviously le
On Tue, Oct 09, 2012 at 06:05:57PM +0800, rqslt wrote:
> ??? 2012???10???09??? 17:05, Nir Soffer ??:
> >
> >On Oct 9, 2012, at 6:12 AM, rqslt wrote:
> >
> >> I want know how to jude is the bufferevent has been free. In
> >>function A , i use bufferevent_free free the bufferevetn; In
> >>fucti
On Tue, Oct 09, 2012 at 06:22:08PM -0400, Programmist Setevik wrote:
> 1) "Main" thread that does something like this, (pseudo code):
>
> for ( all configured listen ports) {
> FD = socket()
> bind()
> set non-block()
> listen
> add FD to a list
>
> }
>
> for (configurable # of worker thr
On Wed, Oct 10, 2012 at 01:16:20PM -0400, Programmist Setevik wrote:
> Mark -
>
> that each worker performs independent accept() - by monitoring the shared
> listener FD on its own event_base ?
>
This.
***
To unsubscribe, send
On Wed, Oct 10, 2012 at 01:19:31PM -0400, Programmist Setevik wrote:
> Is there an easy/supported way to have OpenSSL 1.x perform NPN negotiation
> while using libevent's support for OpenSSL ?
> Need to be told what SSL ended up selecting , from the proposed list of
> protos.
>
> Any code examples
On Mon, Oct 22, 2012 at 11:08:23PM +, John Dunn wrote:
> I'm trying to modify the hiperfifo.c example included in libcurl
> (http://curl.haxx.se/libcurl/c/hiperfifo.html ) to use libevent 2.0.20 and
> had a few questions. I know the originator of this code is the libcurl people
> but I figur
On Mon, Nov 19, 2012 at 03:31:17PM +0200, Nir Soffer wrote:
>
> I don't think this is a good example for using libevent (maybe I do not
> understand what it does correctly).
>
> That server creates one event loop for accepting connections, and then one
> event loop for each connection. Since the
On Mon, Nov 19, 2012 at 10:12:53PM +0200, Nir Soffer wrote:
> On Mon, Nov 19, 2012 at 7:26 PM, Pander wrote:
>
> > Second question is regarding buffer_in in request. I can't seem to find
> > a proper example with helpers to retrieve the POST parameters.
>
>
> If you want to support the default f
On Tue, Nov 20, 2012 at 09:45:17AM +0200, Nir Soffer wrote:
>
> On Nov 20, 2012, at 12:34 AM, Pander wrote:
>
> >
> >only this works:
> >
> >char buf[1024];
> >int n;
> >while ((n = evbuffer_remove(req->buffer_in, buf, sizeof(buf))) > 0) {
> > fwrite(buf, 1, n, stdout);
> >}
> >printf("\n");
>
On Tue, Nov 20, 2012 at 09:45:17AM +0200, Nir Soffer wrote:
>
> On Nov 20, 2012, at 12:34 AM, Pander wrote:
>
> >
> >only this works:
> >
> >char buf[1024];
> >int n;
> >while ((n = evbuffer_remove(req->buffer_in, buf, sizeof(buf))) > 0) {
> > fwrite(buf, 1, n, stdout);
> >}
> >printf("\n");
>
On Wed, Dec 05, 2012 at 11:10:04AM +0200, Nir Soffer wrote:
> On Wed, Dec 5, 2012 at 10:54 AM, Sashan Govender wrote:
>
> > Hi!
> >
> >
> >> 1) I don't see any notion of event notification on FD exception - e.g.
> >> socket close.
> >> There are some words for buffer events, but nothing for r
1 - 100 of 114 matches
Mail list logo