From awantik.das at rancoretech.com Sat Mar 1 05:52:48 2008 From: awantik.das at rancoretech.com (awantik.das) Date: Sat Mar 1 05:58:07 2008 Subject: [Libevent-users] Can libevent be successfully be used for RTOS application Message-ID: <001701c87b8a$636780d0$a4197c0a@RTEC.IND.RIL.COM> Hi, I have to develop embedded software for RTOS. Can libevent be used in this case ? Is there any thing disadvantage of libevent for such application. Thanks & Regards, Awantik Das -------------- next part -------------- An HTML attachment was scrubbed... URL: http://monkeymail.org/archives/libevent-users/attachments/20080301/dfa7767c/attachment.htm From provos at citi.umich.edu Sat Mar 1 20:53:28 2008 From: provos at citi.umich.edu (Niels Provos) Date: Sat Mar 1 20:53:32 2008 Subject: [Libevent-users] Can libevent be successfully be used for RTOS application In-Reply-To: <001701c87b8a$636780d0$a4197c0a@RTEC.IND.RIL.COM> References: <001701c87b8a$636780d0$a4197c0a@RTEC.IND.RIL.COM> Message-ID: <850f7cbe0803011753q6c59cee2haf7518fc087c49e6@mail.gmail.com> On Sat, Mar 1, 2008 at 2:52 AM, awantik.das wrote: > I have to develop embedded software for RTOS. Can libevent be > used in this case ? I see no reason why not. You should try it and let us know how it goes. Niels. From iler.ml at gmail.com Mon Mar 3 08:33:37 2008 From: iler.ml at gmail.com (Yakov Lerner) Date: Mon Mar 3 08:34:10 2008 Subject: [Libevent-users] selecting 'method' (epoll vs poll vs select) Message-ID: How do I select 'method' to use when I inititailze libevent ? (epoll vs poll vs select) Thanks Yakov -------------- next part -------------- An HTML attachment was scrubbed... URL: http://monkeymail.org/archives/libevent-users/attachments/20080303/79251f22/attachment.htm From iler.ml at gmail.com Mon Mar 3 09:15:55 2008 From: iler.ml at gmail.com (Yakov Lerner) Date: Mon Mar 3 09:16:04 2008 Subject: [Libevent-users] thread-safety Message-ID: What is thread-safety of libevent ? Specifically, is it OK if I run libevent mainloop in one thread, and register new events in other thread ? Yakov -------------- next part -------------- An HTML attachment was scrubbed... URL: http://monkeymail.org/archives/libevent-users/attachments/20080303/6bc9a53f/attachment.htm From david.gueluy at netasq.com Mon Mar 3 08:52:42 2008 From: david.gueluy at netasq.com (=?ISO-8859-1?Q?david_gu=E9luy?=) Date: Mon Mar 3 09:22:13 2008 Subject: [Libevent-users] selecting 'method' (epoll vs poll vs select) In-Reply-To: References: Message-ID: <25A43CF8-1C2E-4378-B39A-7D5FCCBD1444@netasq.com> Hello, You can set some environment variables to disable these methods (EVENT_NOEPOLL / EVENT_NOPOLL / EVENT_NOSELECT ...) setenv("EVENT_NOEPOLL", "1", 1); Le 3 mars 08 ? 14:33, Yakov Lerner a ?crit : > How do I select 'method' to use when I > inititailze libevent ? (epoll vs poll vs select) > > Thanks > Yakov > _______________________________________________ > Libevent-users mailing list > Libevent-users@monkey.org > http://monkeymail.org/mailman/listinfo/libevent-users From iler.ml at gmail.com Mon Mar 3 10:24:08 2008 From: iler.ml at gmail.com (Yakov Lerner) Date: Mon Mar 3 10:24:13 2008 Subject: [Libevent-users] example simple app incl. main() ? Message-ID: Where can I see complete but simlpe app that uses libevent, including main(), say, echoserver, so that it has examples of async write and async read ? I saw example of a separate single function but I do not see example of the app. Yakov -------------- next part -------------- An HTML attachment was scrubbed... URL: http://monkeymail.org/archives/libevent-users/attachments/20080303/4ad7180f/attachment.htm From provos at citi.umich.edu Mon Mar 3 11:50:27 2008 From: provos at citi.umich.edu (Niels Provos) Date: Mon Mar 3 11:50:38 2008 Subject: [Libevent-users] thread-safety In-Reply-To: References: Message-ID: <850f7cbe0803030850i261632aaw63dceb68cf7e7ec2@mail.gmail.com> On Mon, Mar 3, 2008 at 6:15 AM, Yakov Lerner wrote: > What is thread-safety of libevent ? Specifically, is it OK > if I run libevent mainloop in one thread, and register new > events in other thread ? The 1.4 branch supports an event base for each thread. Trunk has support for providing user specific locking primitives so that other threads can add or remove events from an event base owned by a different thread. Niels. From libevent at pureftpd.org Mon Mar 3 12:29:51 2008 From: libevent at pureftpd.org (Frank Denis) Date: Mon Mar 3 12:31:36 2008 Subject: [Libevent-users] evhttp: how to detect a client that closed the connection? Message-ID: <20080303172951.GA8950@pureftpd.org> Hello, Does anyone know if there is a way with evhttp to trigger a callback when a client drops the connection, and without waiting for a timeout? The close callback is properly called after evhttp_send_reply() sent something. But if the client drops the connection after it has been accepted and before the reply, it looks like no callback is called. Is there a clean way to work around this, or is it a bug? Best regards, -- Frank Denis - j [at] pureftpd.org http://forum.manucure.info - http://www.manucure-pro.com - http://00f.net From iler.ml at gmail.com Mon Mar 3 14:10:37 2008 From: iler.ml at gmail.com (Yakov Lerner) Date: Mon Mar 3 14:10:56 2008 Subject: [Libevent-users] example simple app incl. main() ? In-Reply-To: <6d880c430803030742s3d218d1av4a9724783f8a58e5@mail.gmail.com> References: <6d880c430803030742s3d218d1av4a9724783f8a58e5@mail.gmail.com> Message-ID: Hmm, that's http, I hoped for plain tcp events. Do you happen to have one ? The API documentation happen to be the prototypes of functions in the .h file, or I am missing the manpage ? Yakov On Mon, Mar 3, 2008 at 5:42 PM, Lyes Amazouz wrote: > > dem2.c is a client > > event-test.c is the server (it works with a web browser; dont forget to > create the input file) > I hope you will be glad > > 2008/3/3, Yakov Lerner : > > > > Where can I see complete but simlpe app that uses libevent, > > including main(), say, echoserver, so that it has examples of > > async write and async read ? I saw example of a separate single > > function but I do not > > see example of the app. > > > > Yakov > > > > _______________________________________________ > > Libevent-users mailing list > > Libevent-users@monkey.org > > http://monkeymail.org/mailman/listinfo/libevent-users > > > > > > > -- > =============================== > Lyes Amazouz > USTHB, Algiers > =============================== -------------- next part -------------- An HTML attachment was scrubbed... URL: http://monkeymail.org/archives/libevent-users/attachments/20080303/72c72aae/attachment.htm From rognar at gmail.com Mon Mar 3 14:17:01 2008 From: rognar at gmail.com (Maksim Lapo) Date: Mon Mar 3 14:17:13 2008 Subject: [Libevent-users] thread-safety In-Reply-To: <850f7cbe0803030850i261632aaw63dceb68cf7e7ec2@mail.gmail.com> References: <850f7cbe0803030850i261632aaw63dceb68cf7e7ec2@mail.gmail.com> Message-ID: So, is it thread-safety **work: 1) On startup I call to event_init() which give me back an "event base" bool SocketManager::Init() { m_base = (event_base*)event_init(); return (m_base != NULL); } 2) I run libevent mainloop in new thread with this "event base" void SocketRunnable::ThreadProc() { // while(!g_bExit) { // // .... // if( event_base_loop(m_base, 0) == -1 ) { outError(" Critical error is occured in event_loot. Exit."); return; } } } This thread handles the listen socket; it calls accept() and SocketManager::AddSocket() to add new socket event loop bool SocketManager::AddSocket(SocketBase* pSocket) { event_set(&pSocket->m_ev_read, (int)pSocket->GetHandle(), EV_READ | EV_PERSIST, io_handle_read, pSocket); event_base_set(m_base, &pSocket->m_ev_read); if(event_add(&pSocket->m_ev_read, &tv) == -1) return false; event_set(&pSocket->m_ev_write, (int)pSocket->GetHandle(), EV_WRITE, io_handle_write, pSocket); event_base_set(m_base, &pSocket->m_ev_write); return true; } 3) After "event_base_set(m_base, &pSocket->m_ev_write);" if i want to send from another thread, i can call smth like this: bool Socket::Send(IN const uint8* pSrc, INOUT uint32 unSize) { //some checks and output buffer operation return (event_add(&m_ev_write, NULL) != -1); } and on write callback i send data directly in socket: void io_handle_write(int fd, short event, void *arg) { send(fd, ........); } am i right or wrong? Thanks. P.S. Sorry for bad English.. Best regards, Maksim Lapo -------------- next part -------------- An HTML attachment was scrubbed... URL: http://monkeymail.org/archives/libevent-users/attachments/20080303/7f7c7fee/attachment.htm From 404emailnotfound at gmail.com Mon Mar 3 17:15:50 2008 From: 404emailnotfound at gmail.com (Matt Pearson) Date: Mon Mar 3 17:16:07 2008 Subject: [Libevent-users] example simple app incl. main() ? In-Reply-To: References: <6d880c430803030742s3d218d1av4a9724783f8a58e5@mail.gmail.com> Message-ID: <706b4240803031415s292db2b1qdc1c54b2f80c0c55@mail.gmail.com> On Mon, Mar 3, 2008 at 2:10 PM, Yakov Lerner wrote: > The API documentation happen to be the prototypes of functions in the .h > file, > or I am missing the manpage ? There is a manpage, that gives pretty good descriptions of how everything works. I haven't looked at anything since version 1.1, since Debian is still on that version, but I assume it has grown to encompass the new additions to the library. I've written a small program that uses the normal libevent listeners as well as the bufferevents. No timers, though, unfortunately. You can check it out at http://thchub.no-ip.com/proxy.c From tbullock at canada.com Tue Mar 4 01:16:27 2008 From: tbullock at canada.com (Ted Bullock) Date: Tue Mar 4 01:14:41 2008 Subject: [Libevent-users] evhttp: how to detect a client that closed the connection? In-Reply-To: <20080303172951.GA8950@pureftpd.org> References: <20080303172951.GA8950@pureftpd.org> Message-ID: <47CCE93B.1090406@canada.com> Frank Denis wrote: > Hello, > > Does anyone know if there is a way with evhttp to trigger a callback when > a client drops the connection, and without waiting for a timeout? > > The close callback is properly called after evhttp_send_reply() sent > something. But if the client drops the connection after it has been accepted > and before the reply, it looks like no callback is called. > > Is there a clean way to work around this, or is it a bug? > > Best regards, Yeah, I'd like to see an answer to this too. I have been working on porting httperf to libevent, and this is one of the issues that has come up. Thanks, -Ted -- Theodore Bullock, B.Sc Software Engineering Bike Across Canada Adventure http://www.comlore.com/bike From libevent at pureftpd.org Tue Mar 4 04:52:11 2008 From: libevent at pureftpd.org (Frank Denis) Date: Tue Mar 4 04:53:05 2008 Subject: [Libevent-users] evhttp: how to detect a client that closed the connection? In-Reply-To: <1204611522.15337.1240416111@webmail.messagingengine.com> References: <20080303172951.GA8950@pureftpd.org> <47CCE93B.1090406@canada.com> <1204611522.15337.1240416111@webmail.messagingengine.com> Message-ID: <20080304095211.GA18154@pureftpd.org> Le Tue, Mar 04, 2008 at 09:18:42AM +0300, Donghui Wen ecrivait : > You can use evhttp_connection_set_closecb to set up the callback. Hello, The callback set with evhttp_connection_set_closecb() is not called before you pushed up some reply. I'm working on a bosh-like XMPP/HTTP proxy and the issue is this scenario: - Client connects through HTTP, this creates a new evhttp_connection - the callback for the URI sets up a new connection to the XMPP server, but does not reply anything to the HTTP request yet - back to the libevent event loop - now, the HTTP client drops the connection => no callback is called. On the other hand, that scenario perfectly works: - Client connects through HTTP, this creates a new evhttp connection - sooner or later, evhttp_send_reply() is called to push the reply - once the reply has been sent, the callback set with evhttp_connection_set_closecb() is fired as expected. From ycrux at club-internet.fr Sun Mar 9 11:28:46 2008 From: ycrux at club-internet.fr (Ycrux) Date: Sun Mar 9 11:28:59 2008 Subject: [Libevent-users] A different "cb_arg" for each client In-Reply-To: <706b4240803031415s292db2b1qdc1c54b2f80c0c55@mail.gmail.com> References: <6d880c430803030742s3d218d1av4a9724783f8a58e5@mail.gmail.com> <706b4240803031415s292db2b1qdc1c54b2f80c0c55@mail.gmail.com> Message-ID: <47D4022E.8090508@club-internet.fr> Hi guys ! I'd like to have a different "cb_arg" argument returned by the registered evhttp callback "cb" for each client in: void(* *cb* )(struct evhttp_request *, void * cb_arg) For this purpose, is it possible to call "evhttp_set_gencb" one time for each connected client? What's the bestion solution for that please? Any advice will be very welcome. Thanks in advance, cheers Y. From lyesjob at gmail.com Mon Mar 10 09:24:45 2008 From: lyesjob at gmail.com (Lyes Amazouz) Date: Mon Mar 10 09:34:57 2008 Subject: [Libevent-users] sockets descriptor access Message-ID: <60d886530803100624p6c6d2490j1f6881666cc2deb0@mail.gmail.com> Hello everybody I want to know if there is a mean to access the socket descriptor associated with the evhttp_connection object (the field fd i guess), because I want to use it as a key for a hash function. instead of this, can the server specify, for each client, an independent user environment either the argument given when we set the callback functions of the server object? Greetings and thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://monkeymail.org/archives/libevent-users/attachments/20080310/905d4e5b/attachment-0001.htm From provos at citi.umich.edu Wed Mar 12 00:58:17 2008 From: provos at citi.umich.edu (Niels Provos) Date: Wed Mar 12 00:58:19 2008 Subject: [Libevent-users] sockets descriptor access In-Reply-To: <60d886530803100624p6c6d2490j1f6881666cc2deb0@mail.gmail.com> References: <60d886530803100624p6c6d2490j1f6881666cc2deb0@mail.gmail.com> Message-ID: <850f7cbe0803112158l52c1fb9fn3a398ab67b1cc1c4@mail.gmail.com> On Mon, Mar 10, 2008 at 6:24 AM, Lyes Amazouz wrote: > I want to know if there is a mean to access the socket descriptor associated > with the evhttp_connection object (the field fd i guess), because I want to > use it as a key for a hash function. > instead of this, can the server specify, for each client, an independent > user environment either the argument given when we set the callback > functions of the server object? I guess I do not quite understand what you are trying to accomplish. In most cases, you will get a different fd for each connection. Perhaps, you could explain the reason for hashing on something? Why don't you hash on the remote IP? Niels. From adrian at creative.net.au Wed Mar 12 01:44:15 2008 From: adrian at creative.net.au (Adrian Chadd) Date: Wed Mar 12 01:29:37 2008 Subject: [Libevent-users] sockets descriptor access In-Reply-To: <850f7cbe0803112158l52c1fb9fn3a398ab67b1cc1c4@mail.gmail.com> References: <60d886530803100624p6c6d2490j1f6881666cc2deb0@mail.gmail.com> <850f7cbe0803112158l52c1fb9fn3a398ab67b1cc1c4@mail.gmail.com> Message-ID: <20080312054415.GA22808@skywalker.creative.net.au> On Tue, Mar 11, 2008, Niels Provos wrote: > On Mon, Mar 10, 2008 at 6:24 AM, Lyes Amazouz wrote: > > I want to know if there is a mean to access the socket descriptor associated > > with the evhttp_connection object (the field fd i guess), because I want to > > use it as a key for a hash function. > > instead of this, can the server specify, for each client, an independent > > user environment either the argument given when we set the callback > > functions of the server object? > > I guess I do not quite understand what you are trying to accomplish. > In most cases, you will get a different fd for each connection. > Perhaps, you could explain the reason for hashing on something? Why > don't you hash on the remote IP? I can think of one particular reason - Squid implements "pinned" connections which pin particular client connections to particular server connections. This allows for things such as NTLM support to function, which assumes the underlying connection between client and server stays linked for the lifetime of the connection. This upsets normal proxy semantics and, at least in the old Squid versions, you could probably hijack an NTLM session like this as Squid used to treat all connections to a remote host as equivalent for selecting persistent connections. 2c, Adrian -- - Xenion - http://www.xenion.com.au/ - VPS Hosting - Commercial Squid Support - - $25/pm entry-level VPSes w/ capped bandwidth charges available in WA - From ycrux at club-internet.fr Wed Mar 12 18:40:18 2008 From: ycrux at club-internet.fr (Ycrux) Date: Wed Mar 12 18:40:29 2008 Subject: [Libevent-users] sockets descriptor access In-Reply-To: <850f7cbe0803112158l52c1fb9fn3a398ab67b1cc1c4@mail.gmail.com> References: <60d886530803100624p6c6d2490j1f6881666cc2deb0@mail.gmail.com> <850f7cbe0803112158l52c1fb9fn3a398ab67b1cc1c4@mail.gmail.com> Message-ID: <47D85BD2.8090501@club-internet.fr> Hi Niels, > I guess I do not quite understand what you are trying to accomplish. > In most cases, you will get a different fd for each connection. > Perhaps, you could explain the reason for hashing on something? Why > don't you hash on the remote IP? > We can have the case that multiple clients use the same IP address. Hashing this IP will produce the same digest. Following your suggestion, is there any recommended way (i.e. via a getter method) to access the "fd" descriptor? By the way. Is there a clean method to exit the libevent infinite loop and shutdown my server cleanly? Thanks in advance cheers Y From dgotwisner at rosum.com Wed Mar 12 20:13:22 2008 From: dgotwisner at rosum.com (Dave Gotwisner) Date: Wed Mar 12 20:13:36 2008 Subject: [Libevent-users] sockets descriptor access In-Reply-To: <47D85BD2.8090501@club-internet.fr> References: <60d886530803100624p6c6d2490j1f6881666cc2deb0@mail.gmail.com> <850f7cbe0803112158l52c1fb9fn3a398ab67b1cc1c4@mail.gmail.com> <47D85BD2.8090501@club-internet.fr> Message-ID: <47D871A2.6070204@rosum.com> Ycrux wrote: > Hi Niels, > >> I guess I do not quite understand what you are trying to accomplish. >> In most cases, you will get a different fd for each connection. >> Perhaps, you could explain the reason for hashing on something? Why >> don't you hash on the remote IP? >> > > We can have the case that multiple clients use the same IP address. > Hashing this IP will produce the same digest. > > Following your suggestion, is there any recommended way (i.e. via a > getter method) to access the "fd" descriptor? You can use IP and Port (source or dest, I don't remember which). One of the port numbers is 80, the other is unique for the IP address. From provos at citi.umich.edu Thu Mar 13 00:44:44 2008 From: provos at citi.umich.edu (Niels Provos) Date: Thu Mar 13 00:44:50 2008 Subject: [Libevent-users] sockets descriptor access In-Reply-To: <47D85BD2.8090501@club-internet.fr> References: <60d886530803100624p6c6d2490j1f6881666cc2deb0@mail.gmail.com> <850f7cbe0803112158l52c1fb9fn3a398ab67b1cc1c4@mail.gmail.com> <47D85BD2.8090501@club-internet.fr> Message-ID: <850f7cbe0803122144t1c2cd974tb9df077883342df2@mail.gmail.com> On Wed, Mar 12, 2008 at 2:40 PM, Ycrux wrote: > We can have the case that multiple clients use the same IP address. > Hashing this IP will produce the same digest. The way that this is done usually with HTTP is to set a session cookie on the client. The client then echos the cookie back and everything is good. Niels. From coroberti at gmail.com Thu Mar 13 01:49:31 2008 From: coroberti at gmail.com (Robert Iakobashvili) Date: Thu Mar 13 01:49:43 2008 Subject: [Libevent-users] sockets descriptor access In-Reply-To: <850f7cbe0803122144t1c2cd974tb9df077883342df2@mail.gmail.com> References: <60d886530803100624p6c6d2490j1f6881666cc2deb0@mail.gmail.com> <850f7cbe0803112158l52c1fb9fn3a398ab67b1cc1c4@mail.gmail.com> <47D85BD2.8090501@club-internet.fr> <850f7cbe0803122144t1c2cd974tb9df077883342df2@mail.gmail.com> Message-ID: <7e63f56c0803122249q3e52e7f6ia0174f36b9a5ba5c@mail.gmail.com> Hi Neils and Ycrux, On Thu, Mar 13, 2008 at 6:44 AM, Niels Provos wrote: > On Wed, Mar 12, 2008 at 2:40 PM, Ycrux wrote: > > We can have the case that multiple clients use the same IP address. > > Hashing this IP will produce the same digest. > > The way that this is done usually with HTTP is to set a session cookie > on the client. The client then echos the cookie back and everything > is good. Yes, it works. However, when several FireFox browsers are running at the same host or tabs within the same FF or tabs within IE-7,8, they will all share the same cookie, that may be an issue to handle. Sincerely, Robert Iakobashvili "Light will come from Jerusalem" ........................................................... http://curl-loader.sourceforge.net An open-source web testing and traffic generation. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://monkeymail.org/archives/libevent-users/attachments/20080313/29e5acf9/attachment.htm From ycrux at club-internet.fr Thu Mar 13 06:46:26 2008 From: ycrux at club-internet.fr (ycrux@club-internet.fr) Date: Thu Mar 13 06:46:58 2008 Subject: [Libevent-users] sockets descriptor access Message-ID: Hi, Thanks for all the advices. My problem is a little bit tricky than that. Some of my clients aren't browser at all (i.e. we built command line tool dedicated to this task which gives us more flexibility than a browser). Thus, adding cookies is out of our actual scope. Maybe "remote port" will do the job. cheers Y. ----Message d'origine---- >Date: Thu, 13 Mar 2008 07:49:31 +0200 >De: "Robert Iakobashvili" >A: "Niels Provos" >Sujet: Re: [Libevent-users] sockets descriptor access >Copie ?: Ycrux, "Lyes Amazouz", > libevent-users@monkey.org > boundary="----=_Part_15007_4546264.1205387371838" > 850f7cbe0803112158l52c1fb9fn3a398ab67b1cc1c4@mail.gmail.com > 47D85BD2.8090501@club-internet.fr > 850f7cbe0803122144t1c2cd974tb9df077883342df2@mail.gmail.com > >Hi Neils and Ycrux, > >On Thu, Mar 13, 2008 at 6:44 AM, Niels Provos wrote: > >> On Wed, Mar 12, 2008 at 2:40 PM, Ycrux wrote: >> > We can have the case that multiple clients use the same IP address. >> > Hashing this IP will produce the same digest. >> >> The way that this is done usually with HTTP is to set a session cookie >> on the client. The client then echos the cookie back and everything >> is good. > > >Yes, it works. However, when several FireFox browsers are running at the >same host >or tabs within the same FF or tabs within IE-7,8, they will all share the >same cookie, >that may be an issue to handle. > >Sincerely, >Robert Iakobashvili >"Light will come from Jerusalem" >........................................................... >http://curl-loader.sourceforge.net >An open-source web testing and traffic generation. > > From libevent at bserved.nl Thu Mar 13 08:17:44 2008 From: libevent at bserved.nl (Bas Verhoeven) Date: Thu Mar 13 08:17:53 2008 Subject: [Libevent-users] libevent on windows: select() fails Message-ID: <47D91B68.7070001@bserved.nl> Hi, I have tried compiling libevent (svn, 1.3.99-trunk) for windows with MSVC 9 (Visual Studio 2008), after loads of fiddling I managed to compile the project with a few minor warnings, and I ended up with a "libevent.lib". I linked ws2_32.lib and got a bunchload of errors while initializing libevent. After an hour I figured out that it might be useful to initialize winsock before actually using it, for some reason I expected libevent to do this. Things are progressing a bit more, 'time-test' runs fine: V:\dev\libevent-svn\WIN32-Prj\time_test\Debug>time_test.exe [msg] libevent using: win32 timeout_cb: called at 1205409820: 2 timeout_cb: called at 1205409822: 2 So does 'signal-test': V:\dev\libevent-svn\WIN32-Prj\signal_test\Debug>signal_test.exe [msg] libevent using: win32 signal_cb: got signal 2 signal_cb: got signal 2 signal_cb: got signal 2 But when I run 'event-test', it seems to die at select(): V:\dev\libevent-svn\WIN32-Prj\event_test\Debug>event_test.exe [msg] libevent using: win32 [debug] event_add: event: 002DFF1C, EV_READ call 00433CE0 [debug] win32_insert: adding event for 916 [debug] win32_dispatch: select returned -1 Any idea why it would do that, and what I can do to fix it? I would really like to start using libevent on windows. Cheers, Bas Verhoeven From adrian at creative.net.au Sun Mar 30 23:53:13 2008 From: adrian at creative.net.au (Adrian Chadd) Date: Sun Mar 30 23:36:41 2008 Subject: [Libevent-users] evhttp changes for large requests In-Reply-To: <47AEE13A.6030808@slamb.org> References: <47AEE13A.6030808@slamb.org> Message-ID: <20080331035313.GH2304@skywalker.creative.net.au> (A bit later than never..) On Sun, Feb 10, 2008, Scott Lamb wrote: > To do that I need some changes. I have some preliminary patches (no > tests yet). > [snip] I'm interested in these sort of changes making it into the libevent http code. Flow control and connection aborting are important for handling HTTP cases that stuff like Squid handles. Adrian From provos at citi.umich.edu Sun Mar 30 23:47:01 2008 From: provos at citi.umich.edu (Niels Provos) Date: Sun Mar 30 23:47:18 2008 Subject: [Libevent-users] evhttp changes for large requests In-Reply-To: <20080331035313.GH2304@skywalker.creative.net.au> References: <47AEE13A.6030808@slamb.org> <20080331035313.GH2304@skywalker.creative.net.au> Message-ID: <850f7cbe0803302047l3d5286c2pc40e81d2ae2215f@mail.gmail.com> On Sun, Mar 30, 2008 at 8:53 PM, Adrian Chadd wrote: > I'm interested in these sort of changes making it into the libevent http > code. Flow control and connection aborting are important for handling > HTTP cases that stuff like Squid handles. I have started looking at them, but they still need some work. In particular, before they can be integrated, we need a test for the http chunking code which is still missing. There are a couple of corner cases that need to be tested first, before looking at connection aborting makes sense. So, perhaps if you have time, you could write a test case for http chunking? In particular, including cases, where the server or the client prematurely closes the connection. Niels. From adrian at creative.net.au Mon Mar 31 01:16:06 2008 From: adrian at creative.net.au (Adrian Chadd) Date: Mon Mar 31 00:59:40 2008 Subject: [Libevent-users] evhttp changes for large requests In-Reply-To: <850f7cbe0803302047l3d5286c2pc40e81d2ae2215f@mail.gmail.com> References: <47AEE13A.6030808@slamb.org> <20080331035313.GH2304@skywalker.creative.net.au> <850f7cbe0803302047l3d5286c2pc40e81d2ae2215f@mail.gmail.com> Message-ID: <20080331051606.GI2304@skywalker.creative.net.au> On Sun, Mar 30, 2008, Niels Provos wrote: > On Sun, Mar 30, 2008 at 8:53 PM, Adrian Chadd wrote: > > I'm interested in these sort of changes making it into the libevent http > > code. Flow control and connection aborting are important for handling > > HTTP cases that stuff like Squid handles. > > I have started looking at them, but they still need some work. In > particular, before they can be integrated, we need a test for the http > chunking code which is still missing. There are a couple of corner > cases that need to be tested first, before looking at connection > aborting makes sense. Ok. > So, perhaps if you have time, you could write a test case for http > chunking? In particular, including cases, where the server or the > client prematurely closes the connection. Sure. What should the behaviour be, and I'll code up some tests. Adrian