Re: How to use a Unix Socket with type SOCK_DGRAM ?

420 views
Skip to first unread message

Iñaki Baz Castillo

unread,
Mar 11, 2014, 9:22:14 PM3/11/14
to li...@googlegroups.com
Now I'm sure that libuv does not support Unix Domain sockets with type
SOCK_DGRAM (AKA Unix datagram sockets):

https://github.com/joyent/libuv/blob/master/src/unix/stream.c#L925


I've also found a thread in the Node mailing list announcing the drop
of Unix datagram sockets (in 2011):

https://groups.google.com/forum/#!topic/nodejs/iCzhcuxGP1I

I expect that such an announcement should be done (or at least also)
in the libuv mailing list, rahter than just in the Node mailing list
(for all those libuv users not interested at all in Node).

Regards.




2014-03-12 2:08 GMT+01:00 Iñaki Baz Castillo <i...@aliax.net>:
> Hi, in Unix/Linux uv_pipe is implemented with Unix Socket, and from
> the documentation: uv_pipe_t is a subclass of uv_stream_t.
>
> Should I assume that uv_pipe_t is always a AF_UNIX,SOCK_STREAM socket?
>
> Is it possible to use a AF_UNIX,SOCK_DGRAM socket within a uv_pipe?
>
>
> Thanks a lot.
>
> --
> Iñaki Baz Castillo
> <i...@aliax.net>



--
Iñaki Baz Castillo
<i...@aliax.net>

Iñaki Baz Castillo

unread,
Mar 11, 2014, 9:08:52 PM3/11/14
to li...@googlegroups.com

Saúl Ibarra Corretgé

unread,
Mar 12, 2014, 3:14:59 AM3/12/14
to li...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 03/12/2014 02:22 AM, Iñaki Baz Castillo wrote:
> Now I'm sure that libuv does not support Unix Domain sockets with
> type SOCK_DGRAM (AKA Unix datagram sockets):
>

You can create the socket yourself, put it in non-blocking mode and
pass it uv_pipe_open.

> https://github.com/joyent/libuv/blob/master/src/unix/stream.c#L925
>

That is not what you think.

>
> I've also found a thread in the Node mailing list announcing the
> drop of Unix datagram sockets (in 2011):
>
> https://groups.google.com/forum/#!topic/nodejs/iCzhcuxGP1I
>
> I expect that such an announcement should be done (or at least
> also) in the libuv mailing list, rahter than just in the Node
> mailing list (for all those libuv users not interested at all in
> Node).
>

I'm not sure if we had the mailing list back in the 0.6 days. Also,
back then node was probably the only libuv user.


Cheers,

- --
Saúl Ibarra Corretgé
bettercallsaghul.com

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Icedove - http://www.enigmail.net/

iQIcBAEBAgAGBQJTIAlzAAoJEEEOVVOum8BZy1wQAJEB6vRUfP7aVY2n0eQr1UYU
ziyZxj7n9wyj9VKSyOt+d+S2wPmHHm80JN9q38F1PtBbAY26CUgPLLZsa+MMloWT
epO0JnzwN66u1IVAR0MW04Ow7kMyQDM69rcr8bg6MjBFJx8fKpOfk/3Jun1pS23R
/f8i4SOhDNhAEfcN3eMyRijDl73glyQIWJ+bNQvt9D8+FgG+aDPnWu2kF47iiuwZ
foDumWhJfzEw03Im9ILjo0Bw18FBRVdcOUChohT5aQwFMdEIEsMJNEKFcrbPZHm1
9DyiH5mGMSLiHPmkqVd0LfUc8MdkaaVnydkdgkThCAOTEPKL+s3k4i13xg6bWobs
uwsixkvpty5NaHYeyzVtolAYRUbAInI2s8K+sRcHAywOzjREEWxUps+K6j99I5MK
TN0tt13mKEreov0106LP2nkVKwJEUvNK3TXq+DfBL1ZFfOXBhlOXKYvrGElPjEXZ
t0ELI8TUktJdhgDwpa+FaBOU07h0Bi16qmc076QeQxuZyDhSh2JS2B3Kef6o0OmB
PrtO4c3xaihZWKDp8nBy3hdnWqmsoAqiYfm+yidc5X2rGki2iFr0ltpW6zf13bVd
+41/UGWQ4AFNzuzwO/Ts3NLzDfKtdH1n7yVqmPJrDlM31i5/gngAy+r2XdqNyUKN
TmphtMwxFpbgkgJedg0A
=TKaQ
-----END PGP SIGNATURE-----

Iñaki Baz Castillo

unread,
Mar 12, 2014, 6:07:38 AM3/12/14
to li...@googlegroups.com
2014-03-12 8:14 GMT+01:00 Saúl Ibarra Corretgé <sag...@gmail.com>:

> I'm not sure if we had the mailing list back in the 0.6 days. Also,
> back then node was probably the only libuv user.

My fault. libuv mailing list was created on 08/08/12.

Iñaki Baz Castillo

unread,
Mar 12, 2014, 6:09:52 AM3/12/14
to li...@googlegroups.com
2014-03-12 8:14 GMT+01:00 Saúl Ibarra Corretgé <sag...@gmail.com>:
> You can create the socket yourself, put it in non-blocking mode and
> pass it uv_pipe_open.

Thanks a lot. Will check it.

To make things even more difficult I want unnamed pipes for
inter-thread communication, which means I will create both sockets
with socketpair() and won't call to bind on any of them.
Reply all
Reply to author
Forward
0 new messages