X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:cc:subject:message-id:reply-to :references:mime-version:content-type:in-reply-to; q=dns; s= default; b=Dx40bI5mZg51aUDPqGmFtxaQYapuMGxdbSnrxbG5GKh9/i2W9abmb TiyVxeYykTpZZHbMP5XcIAy4KJiA1rvLmVky2oDTGhZ55Kg8EqN7Nu8tfCVM12Fn LQcpgVwN3Frf3wC6NYshuTen6KqLwAmOUhu4bwB/r6EzM0+duAi3S8= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:cc:subject:message-id:reply-to :references:mime-version:content-type:in-reply-to; s=default; bh=c6aBtL40A1dTxM1gM+VZo2Tt4dg=; b=Wvt7XSa3T/ImL+A+Tk9T72dqbSoK vBjELOLfcyibWUEGs4SHM5SrUnoXZpSrJy6/+GM8y3Xb+FTCAqGtAlCUATE3oT+4 M99Wgf17SvdCAYlsAcFnooZzHA1PmfXH2KsUxEUcOxC+KQcKKc7Qy6udlwb2FvII +GPerFWJ4U6alUw= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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 Date: Thu, 8 Aug 2019 10:25:28 +0200 From: Corinna Vinschen To: Biswapriyo Nath Cc: cygwin AT cygwin DOT com Subject: Re: Use poll with Windows socket Message-ID: <20190808082528.GG11632@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: Biswapriyo Nath , cygwin AT cygwin DOT 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) --UNrMg7q4I5bA1PGX Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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" -----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--