From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 94414 invoked by alias); 8 Aug 2019 08:25:33 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 94407 invoked by uid 89); 8 Aug 2019 08:25:33 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-104.3 required=5.0 tests=AWL,BAYES_00,GOOD_FROM_CORINNA_CYGWIN,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy= X-HELO: mout.kundenserver.de Received: from mout.kundenserver.de (HELO mout.kundenserver.de) (217.72.192.75) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 08 Aug 2019 08:25:32 +0000 Received: from calimero.vinschen.de ([24.134.7.25]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MulyX-1iCD9O31O7-00rpwj; Thu, 08 Aug 2019 10:25:29 +0200 Received: by calimero.vinschen.de (Postfix, from userid 500) id 10799A80704; Thu, 8 Aug 2019 10:25:28 +0200 (CEST) Date: Thu, 08 Aug 2019 08:25:00 -0000 From: Corinna Vinschen To: Biswapriyo Nath Cc: cygwin@cygwin.com Subject: Re: Use poll with Windows socket Message-ID: <20190808082528.GG11632@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: Biswapriyo Nath , cygwin@cygwin.com References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="UNrMg7q4I5bA1PGX" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.3 (2019-02-01) X-SW-Source: 2019-08/txt/msg00120.txt.bz2 --UNrMg7q4I5bA1PGX Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 590 On Aug 8 02:39, Biswapriyo Nath wrote: > I've tried to use poll() with a Windows socket (from WSASocket) and a > cygwin side file descriptor (fd). But it is only signaled for fd only. >=20 > At first, I have seen that fhandler_socket_wsock::set_socket_handle() cas= ts > SOCKET to int. So, is it possible to use poll() with the SOCKET type? Or = Is > there any magic to convert Windows socket to cygwin fd and vice-versa? No, you can't do that. The Cygwin poll call requires a Cygwin socket, otherwise all the bookkeeping stuff fails. Corinna --=20 Corinna Vinschen Cygwin Maintainer --UNrMg7q4I5bA1PGX Content-Type: application/pgp-signature; name="signature.asc" Content-length: 833 -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEoVYPmneWZnwT6kwF9TYGna5ET6AFAl1L3HcACgkQ9TYGna5E T6AhpxAAh7IGwWQdpeRyK0g3UhNQkHs8FKLzy8V6bAN1hEEBf3Kxk1rXjJydb3Qo 1bhS9R+OgJ+2B/wqpg7PKi95YxCMYy97A4U9tkPzCyzkKW7YKahwmL3MxCwLL9Cx 6pM5UHNkcxhFFUKSWTepVrFavp8AIEZie4DMyHa8jPHLDWFO+hRuI/je6UWUQo13 zPHie92hZDuq4hDga7nPlLJjby2WVoSdTm22SjRC/Z/XlHNNCY6gdZtaWu8IEw5T tSPMoMA691KnerqGE8nkkiOc6HnapvKibXvQXL0dT4Lda3WM1qEXJyRY0dlCv9uP RW5Wn3//WH1+z5eAZzrMX4STHWF90RIU5hOB7uBamQYj+EdbCX+EWoqSnlleQ99X 66OXr2JgipKmC+SkYChmlJ0E+4QUhPEBLyJFW2NwZS7Z96TontndKQ26HXrVN/SK mv2wOj99UAa2TtFMf8C0xBSnR0fwiibt4UmYxeIHlPPYSz3/0MZ/82vu9WGV2rTO M/hjVQwmmjoxtWnHaSI79u8I/+SpBgBNBQUghZopzvSq461MxxxzBslxYqRt8CIW aWnu0h3B71aPF6rEnVQjN/+SI8Yle6f/fkO5UFTfvPh1IhDXOdU/na6WMrxcSOtp XIoZI3rtUVTh9dX6wHqaU3lBLi4qVeNfiPfu2dyH5Hh33cKwDqc= =at46 -----END PGP SIGNATURE----- --UNrMg7q4I5bA1PGX--