Boost logo

Boost Users :

From: Sascha Seewald (vudu_at_[hidden])
Date: 2006-09-01 08:22:05


Hi boosters!

I've written a simple client-server example using
boost::asio::ip::tcp::socket. I establish the connection using
socket::connect() and close it using socket::close().

But how can I determine the current state of connection (Am I still
connected or not?)

Is it sufficient to check whether the socket is open? Is there a
function socket::is_open()?

Or do I have to track errors for disconnection events and set some
is_connected-flag somewhere.

Btw what is the purpose of the keep_alive socket option?

Thanks in advance

Sascha


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net