This is the mail archive of the 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]

Obtaining pointer to underlying Winsock for Cygwin Unix Socket?

My question:
How do I obtain the pointer to the Winsock that corresponds to a Cygwin
Unix socket?

I am porting a Unix program from a Linux environment to an NT box with
Cygwin and a vendor-supplied X-Windows development kit.  This is legacy
code, and there is a LOT of it (close to 1M lines C/C++).  Our code
makes extensive use of Unix sockets and we are applying them in ways
that are not compatible with Winsock usage (for instance, we mix our
socket file descriptors with standard file descriptors for purposes of
"select", "read" and "write").  The X-Windows tool kit vendor CLAIMS
Cygwin compatibility, but the tool fails when I send a Unix-style socket
file descriptor where a socket would be used.  I have issued my bug
report, but am having little luck getting a patch from them.  They agree
that this is a bug, but the only "help" they have offered is to tell me
that their code is looking for a Winsock, not the Unix socket I am

I thought about replacing the X-Windows tool kit with something that
might *actually work* but there is precious little out there.
XFree86/LessTif understands Unix sockets, but XFree86/LessTif does not
support Motif UIL files, and we've got lots of them.  The
vendor-supplied solution was selected precisely for the Motif support
our development needs.  I am unaware of another NT/Cygwin compatible

Because I cannot just sit still and let my wheels spin, I'm trying to
figure out a work-around.  I am aware that Cygwin Unix sockets are built
on top of Winsock sockets, so there must be a Winsock socket handle
somewhere.  If I could just get a pointer to the Winsock, I could send
that pointer to the vendor's API and get ON with it.  I recognize that
retrieving the Winsock socket and using it in its native form violates
ALL KINDS of OOD practice, but my back is up against the proverbial
wall here.

I've been searching the web and found nothing that would help me with
this problem.  Your help with this is greatly appreciated.

Thank you,
 Sarah Lanham

SarahLanum at HOTMAIL dot COM

(sorry for the bad signature, but I *hate* spam)

Send and receive Hotmail on your mobile device:

Unsubscribe info:
Bug reporting:

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