[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

RE: [Libevent-users] How to close bufferevent connection?



I used 
	bufferevent_free(bev);

-----Original Message-----
From: owner-libevent-users@xxxxxxxxxxxxx [mailto:owner-libevent-users@xxxxxxxxxxxxx] On Behalf Of Felix Nawothnig
Sent: Tuesday, June 01, 2010 12:07 PM
To: libevent-users@xxxxxxxxxxxxx
Subject: [Libevent-users] How to close bufferevent connection?

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.


***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.