On Tue, Jan 15, 2013 at 9:52 AM, <s...@free.fr> wrote: > It serms that this is not the way it should be done. The whole buffer > event should be removed and created again, until the server starts to > respond. Unfortunately this method causes a segmentation fault. I had no > idea of how such a simple problem can be solved with libevent. I couldn't > be able to find an example. >
I wouldn't say that .... I've used libevent in two programs and managed to reconnect to the server if a disconnection happens after the initial connect. I did this by setting up a timer event that was on while the client was disconnected and off while the client was connected or a connection was in progress. This works fine.