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

[Libevent-users] detected a bad network connection for a TCP connection



Hello,

I am testing fault tolerance in my application that is written using
libevent-1.4.6

The application has a client and server connecting over TCP

and the event is setup like this on the client:

event_set(event, sock, EV_READ | EV_PERSIST, recv_from_server, h);

Then I login to the server and bring down the network interface like this:

ifconfig eth3 down.

libevent on the client does not seem to generate any event for me to
detect that the network connection is down.

If I was coding all this by hand, without libevent, I would expect to
be able to detect a disconnection from the socket.

Do you know how I can detect the disconnection caused by bringing down
the interface on the server ... while still using libevent?

Thanks!

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