develooper Front page | perl.perl5.porters | Postings from November 2010

Unix domain sockets on windows

Thread Next
From:
Ben Goldberg
Date:
November 5, 2010 21:51
Subject:
Unix domain sockets on windows
Message ID:
26bf340e-600f-4184-8811-8a7215b4b66c@r29g2000yqj.googlegroups.com
This is probably a crazy idea, but would it be possible for perl to
emulate unix domain sockets on windows by means of CreateNamedPipe?

For a server, socket() and bind() would partially set up the fake
pipe, listen() would call CreateNamedPipe(), accept() would call
ConnectNamedPipe().

For a client, socket() would partially set up the fake pipe, and
connect() would call OpenFile(), and perhaps WaitNamedPipe().

Naturally, perl would prepend "\\.\pipe\" (or should I say "\\\\.\\pipe
\\"?) onto the pipe names passed in to bind or connect.

Is this insane, or could it work?


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About