| www.delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
| Date: | Tue, 29 Mar 2005 10:36:04 -0600 |
| From: | Brian Ford <ford AT vss DOT fsi DOT com> |
| Reply-To: | cygwin AT cygwin DOT com |
| To: | Peter Stephens <ptfoof AT sbcglobal DOT net> |
| cc: | cygwin AT cygwin DOT com |
| Subject: | RE: recv and errno during a connection reset/closed by peer |
| In-Reply-To: | <!~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAAUKQItienSEKG+9226yKd5cKAAAAQAAAADZbnjoLqKEeI3+lfe/tpAgEAAAAA@sbcglobal.net> |
| Message-ID: | <Pine.CYG.4.58.0503291028100.3732@fordpc.vss.fsi.com> |
| References: | <!~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAAUKQItienSEKG+9226yKd5cKAAAAQAAAADZbnjoLqKEeI3+lfe/tpAgEAAAAA AT sbcglobal DOT net> |
| MIME-Version: | 1.0 |
| X-OriginalArrivalTime: | 29 Mar 2005 16:36:07.0155 (UTC) FILETIME=[6812DC30:01C5347D] |
On Mon, 28 Mar 2005, Peter Stephens wrote:
> Brian
>
> Are you saying that there is no way to distinguish a dropped connection from
> a MSG_PEEK with no data to retrieve?
AFAIK, yes. Why are you using this MSG_PEEK method?
Why not just do a poll and look for POLLHUP
(http://www.opengroup.org/onlinepubs/009695399/functions/poll.html):
POLLHUP
The device has been disconnected. This event and POLLOUT are
mutually-exclusive; a stream can never be writable if a hangup has
occurred. However, this event and POLLIN, POLLRDNORM, POLLRDBAND, or
POLLPRI are not mutually-exclusive. This flag is only valid in the revents
bitmask; it shall be ignored in the events member.
and http://cygwin.com/acronyms/#PCYMTNQREAIYR ;-).
--
Brian Ford
Senior Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
the best safety device in any aircraft is a well-trained pilot...
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |