Boost logo

Boost Users :

Subject: Re: [Boost-users] About boost::asio
From: Ken zhang (kennir_at_[hidden])
Date: 2008-11-16 04:14:00

Hi Scott.

     Thanks Scott. That's worked, but In my code, async_read returned
"boost::asio::error::eof" when a socket is closed.

   Best Regards.

Yours Kennir

2008/11/16 Scott Gifford <sgifford_at_[hidden]>

> "Ken zhang" <kennir_at_[hidden]> writes:
> > I want to handle socket close event in my connection, but I can't
> found
> > mothed in ip::tcp::socket,How can I handle close event for socket?
> Hello Kennir,
> If you have an outstanding read request, when the socket is closed the
> read handler will be called with an error indication. In my own code
> I've seen these errors returned when a socket is closed:
> boost::system::errc::no_such_file_or_directory:
> boost::asio::error::shut_down:
> Hope this helps,
> ----Scott.
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]

Best Regards,
Ken Zhang
Greatelsoft Co., Ltd.

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at