I had more time to spend on this, so I continued kicking the can down the road a bit. Martin, I could use your input on a few things. All the named pipes APIs are working with HANDLE and not SOCKET. The IOCP code is fairly intertwined with Winsock code so now that I have written named pipe implementations for nn_cipc_start_connecting and nn_bipc_start_listening, the rest of the code attempts socket operations (like closesocket calls) and fails, because I'm abusing the SOCKET member in nn_usock and force casting the HANDLE coming from CreateNamedPipe to it. I wonder if we should add a HANDLE member to nn_usock to store the named pipe handle, and maybe have a new set of domain/type/protocol values for IPC to distinguish? As it stands those domain, type and protocol fields seem meaningless to me for named pipes. TTimo PS: Latest code for this is at https://github.com/TTimo/nanomsg/commits/master On Sat, Apr 5, 2014 at 5:08 PM, Timothee Besset <ttimo@xxxxxxxxx> wrote: > > https://github.com/TTimo/nanomsg/commit/8830bb35df171284a185f850d73a153a55d017f7 > > Alright this is the direction I'm heading, for now I've just created the > pipe and started listening for client connections. This seemed like the > right things to do in nn_bipc_start_listening. > The code still makes calls to things like nn_usock_start after that, which > issues socket() calls and fails .. but I haven't touched the client side > yet. > > Anyway, any feedback welcome. Only spent a few hours in the nanomsg > internals at this point. > > TTimo > > > On Sat, Apr 5, 2014 at 9:11 AM, Timothee Besset <ttimo@xxxxxxxxx> wrote: > >> I'd like to better understand what's involved before committing to >> anything there. >> Exploring the implementation atm, I'll send more precise questions once >> I've done a tour of the code. >> >> TTimo >> >> I'm on the irc channel btw (US timezones mostly). >> >> >> On Fri, Apr 4, 2014 at 11:04 PM, Martin Sustrik <sustrik@xxxxxxxxxx>wrote: >> >>> -----BEGIN PGP SIGNED MESSAGE----- >>> Hash: SHA1 >>> >>> On 05/04/14 04:57, Timothee Besset wrote: >>> >>> > - Shouldn't the documentation reflect what is actually implemented? >>> > It is very misleading as things stand now. Especially if this has >>> > been the situation for months. >>> >>> Yes. I'll fix the docs. >>> >>> > - How much work does this represent, closing the loop on this and >>> > actually getting the functionality? Using a TCP loopback is a >>> > no-go, a lot of firewalls, antivirus/malware things will get in the >>> > way of that (we've tried). >>> >>> The hard part (IOCP support) I've already done. What's missing is the >>> actual implementation of NamedPipes transport. Would you like to give >>> it a go? In general, I think, getting Windows-specific features done >>> tends to be a problem because there's a lot less of >>> contribute-the-code-back mentallity in the Windows community. >>> >>> Martin >>> >>> -----BEGIN PGP SIGNATURE----- >>> Version: GnuPG v1.4.11 (GNU/Linux) >>> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ >>> >>> iQEcBAEBAgAGBQJTP4DIAAoJENTpVjxCNN9YppkH/2HcmEoGs1cKYuntv1YvAoeA >>> j77v07d6iYCy8VlXWD1yxbL8S/+hYz5prWKEAv2q2iUUrig7exBDAZT21x7tTQEI >>> 8cBEXfvWbZNPrSGPG+4RUoGmQtWHLxBoLxF/5D26GsCrcq7HO/t4xxxQ2Tv/53n7 >>> S1Fwx8krHitizjQdXbXTXMXTOpKnsxNxW6pC7ugeuAutElH/Sea2JMMDo/SdB2ra >>> oYB9Du533/EhuB/dpZvyrQmXKaNpDMUK1Ca4GXJzjr36mkT7qNEKC4YEARQQ0QE4 >>> kiOQwRbDX0eIb8XdtREA5pGh6nwYiLOxjAXbaMoUWTEHz590Xlnp3pyaVmhpo6Q= >>> =8Svc >>> -----END PGP SIGNATURE----- >>> >>> >> >