[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[Libevent-users] When to use multiple bases?
- To: libevent-users@xxxxxxxx
- Subject: [Libevent-users] When to use multiple bases?
- From: Jeffrey Walton <noloader@xxxxxxxxx>
- Date: Fri, 21 Feb 2014 12:03:15 -0500
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: libevent-users-outgoing@xxxxxxxx
- Delivered-to: libevent-users@xxxxxxxx
- Delivery-date: Fri, 21 Feb 2014 12:03:19 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:date:message-id:subject:from:to:content-type; bh=tZTjT4mkLhOVEtWZ95ZwR2QOr7ZyI3rCK59mWLaH8Ms=; b=yiP7nogButbcuW9k0X80+Io5UJvitT+FEowFQLitTT48FEhFGk8Nkp8cqdEeieAiW1 oODIYx8OqKFLO32wucqnd0Us33JkrJBurZaMmNnJUItalJ6bjaTKhphUrN648JVRt80e 9TJsZQ+GcOT8jh01riv7yN073psN+39TB8WzDlBMQCW+zJ+SSt4yGDgFvMLUDcOX23kd Mx9Ha/ZyvMR61Y3Tk8rCXRtVP0Il/ZRIaAZ5KrDE/b6jWmv2ck0FXtI59mxR0E3vjKaG 07ZQDMPM4DqJljyf0pew4nhTw2O+XusJmWOmw471BjADcZrBEt8JjAdJRSt2I47SCiTE p9OQ==
- Reply-to: libevent-users@xxxxxxxxxxxxx
- Sender: owner-libevent-users@xxxxxxxxxxxxx
Hi Guys,
Here's another question form the beginer's guide, so please forgive my
ignorance.
I was looking at 'hello-world.c', and I see it uses a single base to
to wait fro incoming connections (via
listener/evconnlistener_new_bind) and and SIGINT (via
signal_event/evsignal_new).
My question is, when is it recommended or appropriate to use a second,
distinct base?
Should a second based be used if a second listener is needed (i.e.,
listen on ports 80 and 443)?
Should a second base be used if a different signal handler is desired
(i.e., SIGKILL or SIGTERM)?
Or should a second base be used if a second thread is used and wants
to wait for events (and not share the other thread's base)?
(I've probably read the answer in Mathewson online book, but I'm not
connecting the dots at the moment).
Thanks in advance.
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users in the body.