delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/10/25/08:11:02

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
Message-ID: <041b01c4ba8b$72fed3e0$010310ac@lyoncleitienne>
From: "Christophe LEITIENNE" <c DOT leitienne AT remove DOT this DOT bgpartners DOT fr>
To: "Cygwin mailing list" <cygwin AT cygwin DOT com>
Subject: cygwin_attach_handle_to_fd and SOCKET.
Date: Mon, 25 Oct 2004 14:09:13 +0200
MIME-Version: 1.0

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019