[Wishlist] Bring AF_UNIX to Perl on windows

--_006_HK0PR03MB3058D43412AE74F52136132C8A790HK0PR03MB3058apcp_
Content-Type: multipart/alternative;
	boundary="_000_HK0PR03MB3058D43412AE74F52136132C8A790HK0PR03MB3058apcp_"

--_000_HK0PR03MB3058D43412AE74F52136132C8A790HK0PR03MB3058apcp_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Since 2018, Windows 10 come to support AF_UNIX family. https://devblogs.mic=
rosoft.com/commandline/af_unix-comes-to-windows/

I can compile the test server and client attached C file successfully by gc=
c 4.8 shipped with strawberry perl 5.20.3 and looks work well.
Could consider bringing it to Perl on windows?


Regards,
Andy

--_000_HK0PR03MB3058D43412AE74F52136132C8A790HK0PR03MB3058apcp_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<html>
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Diso-8859-=
1">
<style type=3D"text/css" style=3D"display:none;"> P {margin-top:0;margin-bo=
ttom:0;} </style>
</head>
<body dir=3D"ltr">
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);">
Since 2018, Windows 10 come to support AF_UNIX family.&nbsp;<a href=3D"http=
s://devblogs.microsoft.com/commandline/af_unix-comes-to-windows/">https://d=
evblogs.microsoft.com/commandline/af_unix-comes-to-windows/</a></div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);">
I can compile the test server and client attached C file successfully by gc=
c 4.8 shipped with strawberry perl 5.20.3 and looks work well.&nbsp;</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);">
Could consider bringing it to Perl on windows?</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);">
Regards,</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);">
Andy</div>
</body>
</html>

--_000_HK0PR03MB3058D43412AE74F52136132C8A790HK0PR03MB3058apcp_--

--_006_HK0PR03MB3058D43412AE74F52136132C8A790HK0PR03MB3058apcp_
Content-Type: text/plain; name="server.c"
Content-Description: server.c
Content-Disposition: attachment; filename="server.c"; size=2711;
	creation-date="Wed, 06 Nov 2019 06:09:10 GMT";
	modification-date="Wed, 06 Nov 2019 06:11:15 GMT"
Content-Transfer-Encoding: base64

I2luY2x1ZGUgPHdpbnNvY2syLmg+DQojaW5jbHVkZSA8d2luZG93cy5oPg0KI2luY2x1ZGUgPHdz
MnRjcGlwLmg+DQojaW5jbHVkZSA8YWZ1bml4Lmg+DQojaW5jbHVkZSA8c3RkbGliLmg+DQojaW5j
bHVkZSA8c3RkaW8uaD4NCg0KI2RlZmluZSBTRVJWRVJfU09DS0VUICJzZXJ2ZXIuc29jayINCg0K
aW50IF9fY2RlY2wgbWFpbih2b2lkKQ0Kew0KDQogICAgU09DS0VUIENsaWVudFNvY2tldCA9IElO
VkFMSURfU09DS0VUOw0KICAgIFNPQ0tFVCBMaXN0ZW5Tb2NrZXQgPSBJTlZBTElEX1NPQ0tFVDsN
CiAgICBpbnQgUmVzdWx0Ow0KICAgIGNoYXIgU2VuZEJ1ZmZlcltdID0gImFmX3VuaXggZnJvbSBX
aW5kb3dzICI7DQogICAgaW50IFNlbmRSZXN1bHQ7DQogICAgU09DS0FERFJfVU4gU2VydmVyU29j
a2V0Ow0KICAgIFdTQURBVEEgV3NhRGF0YTsNCg0KICAgIC8vIEluaXRpY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FNlbmRSZXN1bHQgPT0g
U09DS0VUX0VSUk9SKSB7DQogICAgICAgIHByaW50Zigic2VuZCBmYWlsZWQgd2l0aCBlcnJvcjog
JWRcbiIsIFdTQUdldExhc3RFcnJvcigpKTsNCiAgICAgICAgZ290byBFeGl0Ow0KICAgIH0NCg0K
ICAgIC8vIHNodXRkb3duIHRoZSBjb25uZWN0aW9uLg0KICAgIHByaW50ZigiU2h1dHRpbmcgZG93
blxuIik7DQogICAgUmVzdWx0ID0gc2h1dGRvd24oQ2xpZW50U29ja2V0LCAwKTsNCiAgICBpZiAo
UmVzdWx0ID09IFNPQ0tFVF9FUlJPUikgew0KICAgICAgICBwcmludGYoInNodXRkb3duIGZhaWxl
ZCB3aXRoIGVycm9yOiAlZFxuIiwgV1NBR2V0TGFzdEVycm9yKCkpOw0KICAgICAgICBnb3RvIEV4
aXQ7DQogICAgfQ0KDQpFeGl0Og0KDQogICAgLy8gY2xlYW51cA0KICAgIGlmIChMaXN0ZW5Tb2Nr
ZXQgIT0gSU5WQUxJRF9TT0NLRVQpIHsNCiAgICAgICAgY2xvc2Vzb2NrZXQoTGlzdGVuU29ja2V0
KTsNCiAgICB9DQoNCiAgICBpZiAoQ2xpZW50U29ja2V0ICE9IElOVkFMSURfU09DS0VUKSB7DQog
ICAgICAgIGNsb3Nlc29ja2V0KENsaWVudFNvY2tldCk7DQogICAgfQ0KDQogICAgLy8gQW5hbG9n
b3VzIHRvIGB1bmxpbmtgDQogICAgRGVsZXRlRmlsZUEoU0VSVkVSX1NPQ0tFVCk7DQogICAgV1NB
Q2xlYW51cCgpOw0KICAgIHJldHVybiAwOw0KfQ0KDQo=

--_006_HK0PR03MB3058D43412AE74F52136132C8A790HK0PR03MB3058apcp_
Content-Type: text/plain; name="client.c"
Content-Description: client.c
Content-Disposition: attachment; filename="client.c"; size=815;
	creation-date="Wed, 06 Nov 2019 06:09:24 GMT";
	modification-date="Wed, 06 Nov 2019 06:11:15 GMT"
Content-Transfer-Encoding: base64

DQoj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p9DQo=

--_006_HK0PR03MB3058D43412AE74F52136132C8A790HK0PR03MB3058apcp_
Content-Type: text/plain; name="afunix.h"
Content-Description: afunix.h
Content-Disposition: attachment; filename="afunix.h"; size=562;
	creation-date="Wed, 06 Nov 2019 06:09:45 GMT";
	modification-date="Wed, 06 Nov 2019 06:11:15 GMT"
Content-Transfer-Encoding: base64

LyorKw0KDQpDb3B5cmlnaHQgKGMpIE1pY3Jvc29mdCBDb3Jwb3JhdGlvbg0KDQpNb2R1bGUgTmFt
ZToNCg0KICAgIGFmdW5peC5oDQoNCkFic3RyYWN0Og0KDQogICAgVGhpcyBmaWxlIGNvbnRhaW5z
IHRoZSBkZWZpbml0aW9ucyBmb3IgdGhlIEFGX1VOSVggc29ja2V0IGFkZHJlc3MgZmFtaWx5Lg0K
DQotLSovDQoNCiNpZm5kZWYgX0FGVU5JWF8NCiNkZWZpbmUgX0FGVU5JWF8NCg0KI3ByYWdtYSBv
bmNlDQoNCiNkZWZpbmUgVU5JWF9QQVRIX01BWCAxMDgNCg0KdHlwZWRlZiBzdHJ1Y3Qgc29ja2Fk
ZHJfdW4NCnsNCiAgICAgQUREUkVTU19GQU1JTFkgc3VuX2ZhbWlseTsgICAgIC8qIEFGX1VOSVgg
Ki8NCiAgICAgY2hhciBzdW5fcGF0aFtVTklYX1BBVEhfTUFYXTsgIC8qIHBhdGhuYW1lICovDQp9
IFNPQ0tBRERSX1VOLCAqUFNPQ0tBRERSX1VOOw0KDQojZGVmaW5lIFNJT19BRl9VTklYX0dFVFBF
RVJQSUQgX1dTQUlPUihJT0NfVkVORE9SLCAyNTYpIC8vIFJldHVybnMgVUxPTkcgUElEIG9mIHRo
ZSBjb25uZWN0ZWQgcGVlciBwcm9jZXNzDQoNCiNlbmRpZiAvKiBfQUZVTklYXyAqLw==

--_006_HK0PR03MB3058D43412AE74F52136132C8A790HK0PR03MB3058apcp_--
0
xyf
11/6/2019 6:12:36 AM
perl.perl5.porters 47867 articles. 1 followers. Follow

3 Replies
16 Views

Similar Articles

[PageSpeed] 43

On Wed, 6 Nov 2019 06:12:36 +0000
Andy Xiao <xyf.xiao@outlook.com> wrote:

> Since 2018, Windows 10 come to support AF_UNIX family. https://devblogs.microsoft.com/commandline/af_unix-comes-to-windows/
> 
> I can compile the test server and client attached C file successfully by gcc 4.8 shipped with strawberry perl 5.20.3 and looks work well.
> Could consider bringing it to Perl on windows?
> 
> 
> Regards,
> Andy

We already have it, I implemented it a while ago. All you have to do is
upgrade Socket.pm to 2.029 and AF_UNIX sockets will start working,
provided you're using Windows 10 1803 or newer.
0
me
11/6/2019 12:20:42 PM
--_000_HK0PR03MB3058ABDF827A7B1DAEBB64D18A7B0HK0PR03MB3058apcp_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi Tomasz,
  Sorry, I made a mistake. The test c program can run on my notebook( win10=
 w/ perl 5.20) , but the programs(C and Perl)  are both failed on our app s=
erver (windows server 2016 with perl 5.30). I've asked Microsoft already, t=
hey confirmed that windows server 2016 doesn't support AF_UNIX yet. Sorry f=
or the bothering.

Regards,
Andy
________________________________
From: Tomasz Konojacki <me@xenu.pl>
Sent: Wednesday, November 6, 2019 8:20 PM
To: Andy Xiao <xyf.xiao@outlook.com>
Cc: perl5-porters@perl.org <perl5-porters@perl.org>
Subject: Re: [Wishlist] Bring AF_UNIX to Perl on windows

On Wed, 6 Nov 2019 06:12:36 +0000
Andy Xiao <xyf.xiao@outlook.com> wrote:

> Since 2018, Windows 10 come to support AF_UNIX family. https://devblogs.m=
icrosoft.com/commandline/af_unix-comes-to-windows/
>
> I can compile the test server and client attached C file successfully by =
gcc 4.8 shipped with strawberry perl 5.20.3 and looks work well.
> Could consider bringing it to Perl on windows?
>
>
> Regards,
> Andy

We already have it, I implemented it a while ago. All you have to do is
upgrade Socket.pm to 2.029 and AF_UNIX sockets will start working,
provided you're using Windows 10 1803 or newer.

--_000_HK0PR03MB3058ABDF827A7B1DAEBB64D18A7B0HK0PR03MB3058apcp_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<html>
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Diso-8859-=
1">
<style type=3D"text/css" style=3D"display:none;"> P {margin-top:0;margin-bo=
ttom:0;} </style>
</head>
<body dir=3D"ltr">
<div>
<div id=3D"appendonsend" style=3D"font-family: Calibri, Arial, Helvetica, s=
ans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
</div>
<div style=3D"font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12p=
t; color:rgb(0,0,0)">
Hi Tomasz,</div>
<div style=3D"font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12p=
t; color:rgb(0,0,0)">
&nbsp; Sorry, I made a mistake. The test c program can run on my notebook( =
win10 w/ perl 5.20) , but the programs(C and Perl)&nbsp; are both failed on
<span style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; backgrou=
nd-color: rgb(255, 255, 255); display: inline !important">
our app server (windows server 2016 with perl 5.30)</span>. I've asked Micr=
osoft already, they confirmed that windows server 2016 doesn't support AF_U=
NIX yet. Sorry for the bothering.</div>
<div style=3D"font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12p=
t; color:rgb(0,0,0)">
<br>
</div>
<div style=3D"font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12p=
t; color:rgb(0,0,0)">
Regards,</div>
<div style=3D"font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12p=
t; color:rgb(0,0,0)">
Andy&nbsp;</div>
<hr tabindex=3D"-1" style=3D"display:inline-block; width:98%">
<div id=3D"divRplyFwdMsg" dir=3D"ltr"><font face=3D"Calibri, sans-serif" co=
lor=3D"#000000" style=3D"font-size:11pt"><b>From:</b> Tomasz Konojacki &lt;=
me@xenu.pl&gt;<br>
<b>Sent:</b> Wednesday, November 6, 2019 8:20 PM<br>
<b>To:</b> Andy Xiao &lt;xyf.xiao@outlook.com&gt;<br>
<b>Cc:</b> perl5-porters@perl.org &lt;perl5-porters@perl.org&gt;<br>
<b>Subject:</b> Re: [Wishlist] Bring AF_UNIX to Perl on windows</font>
<div>&nbsp;</div>
</div>
<div class=3D"BodyFragment"><font size=3D"2"><span style=3D"font-size:11pt"=
>
<div class=3D"PlainText">On Wed, 6 Nov 2019 06:12:36 &#43;0000<br>
Andy Xiao &lt;xyf.xiao@outlook.com&gt; wrote:<br>
<br>
&gt; Since 2018, Windows 10 come to support AF_UNIX family. <a href=3D"http=
s://devblogs.microsoft.com/commandline/af_unix-comes-to-windows/">
https://devblogs.microsoft.com/commandline/af_unix-comes-to-windows/</a><br=
>
&gt; <br>
&gt; I can compile the test server and client attached C file successfully =
by gcc 4.8 shipped with strawberry perl 5.20.3 and looks work well.<br>
&gt; Could consider bringing it to Perl on windows?<br>
&gt; <br>
&gt; <br>
&gt; Regards,<br>
&gt; Andy<br>
<br>
We already have it, I implemented it a while ago. All you have to do is<br>
upgrade Socket.pm to 2.029 and AF_UNIX sockets will start working,<br>
provided you're using Windows 10 1803 or newer.<br>
</div>
</span></font></div>
</div>
</body>
</html>

--_000_HK0PR03MB3058ABDF827A7B1DAEBB64D18A7B0HK0PR03MB3058apcp_--
0
xyf
11/8/2019 12:54:07 AM
Reply: