Further, the WinSock2 docs make no mention of AF_UNIX.

And my attempt to use it compiles clean, but results in a runtime error (as expected):

#include <winsock2.h> #include <ws2tcpip.h> #include <stdio.h> int main( int argc, char **argv ) { WSADATA wsaData = {0}; int iResult = 0; SOCKET sock = INVALID_SOCKET; if( WSAStartup(MAKEWORD(2, 2), &wsaData) != 0 ) { printf( "WSAStartup failed: %d\n", iResult); return 1; } sock = socket( AF_UNIX, SOCK_DGRAM, IPPROTO_TCP ); if( sock == INVALID_SOCKET ) printf( "socket function failed with error = %d\n", WSAGetLast +Error() ); else { printf( "socket function succeeded\n" ); iResult = closesocket( sock ); if( iResult == SOCKET_ERROR ) { printf( "closesocket failed with error = %d\n", WSAGetLast +Error() ); WSACleanup(); return 1; } } WSACleanup(); return 0; }

Compile/link/run/error:

C:\test>cl /W3 unixDomainSockets.c Ws2_32.lib Microsoft (R) C/C++ Optimizing Compiler Version 15.00.21022.08 for x64 Copyright (C) Microsoft Corporation. All rights reserved. unixDomainSockets.c Microsoft (R) Incremental Linker Version 9.00.21022.08 Copyright (C) Microsoft Corporation. All rights reserved. /out:unixDomainSockets.exe unixDomainSockets.obj Ws2_32.lib C:\test>unixDomainSockets.exe socket function failed with error = 10047 C:\test>perl -E"say $^E=10047" An address incompatible with the requested protocol was used

So, quite how you are getting away with using *nix domain sockets on Windows I have no idea; but I think that it is more by luck than judgement and probably not doing what you think it is.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

In reply to Re^14: Is there a problem with IPC::Open on Windows 7? by BrowserUk
in thread Is there a problem with IPC::Open on Windows 7? by glasswalk3r

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.