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

[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.