This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

cygwin_attach_handle_to_fd and SOCKET.


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]