Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 Message-ID: <041b01c4ba8b$72fed3e0$010310ac@lyoncleitienne> From: "Christophe LEITIENNE" To: "Cygwin mailing list" Subject: cygwin_attach_handle_to_fd and SOCKET. Date: Mon, 25 Oct 2004 14:09:13 +0200 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="Windows-1252"; reply-type=original Content-Transfer-Encoding: 7bit I'm using cygwin_attach_handle_to_fd to attach a windows SOCKET to a cygwin file descriptor. I do it this way: fd = cygwin_attach_handle_to_fd("/dev/tcp", -1, WindowsSocketHandle, TRUE, GENERIC_READ|GENERIC_WRITE); This call works well under Cygwin 1.3.13, and calls to recv(fd,...) or send(fd,...) also works correctly. Under the last version of Cygwin (1.5.11), cygwin_attach_handle_to_fd still works, but calls to recv() fails with errno 108 (ENOTSOCK - Socket operation on non-socket). I guess the "name" argument I provide to cygwin_attach_handle_to_fd ("/dev/tcp") is wrong under 1.5.11. I had a look at the sources (especially dtable.cc), but did not found any clues. Does anyone knows what "name" argument I should use ? Thanks. -- 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/