[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[Libevent-users] How to close bufferevent connection?
- To: libevent-users@xxxxxxxxxxxxx
- Subject: [Libevent-users] How to close bufferevent connection?
- From: Felix Nawothnig <felix.nawothnig@xxxxxxxxxxxxxx>
- Date: Tue, 01 Jun 2010 05:07:13 +0200
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: libevent-users-outgoing@xxxxxxxx
- Delivered-to: libevent-users@xxxxxxxx
- Delivery-date: Mon, 31 May 2010 23:07:37 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:content-type :date:message-id:mime-version:x-mailer:content-transfer-encoding; bh=0O1VQSe3DXPI13m6mG+LK/ISHD+CmZWMkOej3rp3FZ0=; b=PYL49XaJvhSdB6U6a7RXYk6jCuOg98AUc0YjqhXoLYU6L9dJamA0DscXBMl1htPY9+ e8F26+/Pcb1Om81ivJqgwB1K5qHeLeiBhiwYsjIaYsS/fGnAeAqwXAcfjwZaqaOmEuOz lGUKvrMehRGv3fW5CpwmTd5TYLpP5E1tloRW4=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=subject:from:to:content-type:date:message-id:mime-version:x-mailer :content-transfer-encoding; b=JmivDCmF48FSXyBoweFAOJn3eivwfTS7OiPARbHFr2SVwYykl7kZHIN4KrZNwB9Xw6 4DogN83vl8zLoVelaW9qvMh5MQ063opFHD4OM9GIzPHPtU1JYl7574wK7Q0KUc6AXj/s 8OMV3E3YrTbLueNwDmYO9ZunDDhosFJ7DGXa8=
- Reply-to: libevent-users@xxxxxxxxxxxxx
- Sender: owner-libevent-users@xxxxxxxxxxxxx
Hey.
What's the "suggested" way to close a bufferevent connection?
Currently I do:
fd = bufferevent_getfd(bev);
evutil_closesocket(fd);
... followed by a manual:
my_event_handler(bev, BEV_EVENT_EOF, NULL);
... because it doesn't seem to be called otherwise.
Is this the "correct" way? Is the fact that the event handler not called
a bug?
Cheers,
Felix
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users in the body.