|
Re: Testing socket for disconnect: msg#00034lib.boost.asio.user
Edit - perhaps you could just leave a long-running async_read_some() operation going when idle? Richard On 11/29/06, Richard Dingwall <rdingwall-Re5JQEeQqe8AvxtiuMwx3w@xxxxxxxxxxxxxxxx> wrote: > To answer you first question - > > as I understand it, there's no way to tell if the socket is still > connected without select()-ing* on it. So you will need some sort of > session-layer protocol no-op command that can be sent at intervals to > poll for (detect) disconnections. > > I may be wrong! > > Richard > > * or kqueue(), poll(), epoll() etc, performed by boost::asio > > On 11/29/06, Stas Khirman <staskh-Wuw85uim5zDR7s880joybQ@xxxxxxxxxxxxxxxx> > wrote: > > Hi, > > > > What is 'ASIO-approved' way to check if TCP socket had been disconnected by > > remote peer while no outstanding read/write operation. > > > > Related question - Did I understand correctly that if I have an outstanding > > read/write it will be completed with asio::error:: connection_aborted error > > on remote peer disconnect ? . > > > > Stas > > > > > > > > ------------------------------------------------------------------------- > > Take Surveys. Earn Cash. Influence the Future of IT > > Join SourceForge.net's Techsay panel and you'll get the chance to share your > > opinions on IT & business topics through brief surveys - and earn cash > > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > _______________________________________________ > > asio-users mailing list > > asio-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@xxxxxxxxxxxxxxxx > > https://lists.sourceforge.net/lists/listinfo/asio-users > > > ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Testing socket for disconnect: 00034, Richard Dingwall |
|---|---|
| Next by Date: | Re: Testing socket for disconnect: 00034, Christopher Kohlhoff |
| Previous by Thread: | Re: Testing socket for disconnecti: 00034, Richard Dingwall |
| Next by Thread: | Re: Testing socket for disconnect: 00034, Christopher Kohlhoff |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |