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

Re: [Libevent-users] libevent client tries to reconnect to a lost server



use getsocketopt to get socket error no or use tcpdump to check what happened

2013/1/13 <ssod@xxxxxxx>
What I need : a libevent client which tries to reconnect periodically after loosing connection with the server.

To solve this problem I add evtimer that becomes active once the connection with the server is lost. The evtimer callback calls bufferevent_socket_connect(), but this function returns a negative value. Why ? How can I solve such a problem ?


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