This forum has been archived. Please start a new discussion on GitHub.

UNIX domain sockets


I saw from a couple of threads back in 2004-5 that there was a patch for adding support from the Debian maintainer, and another request for support from another user. However, I haven't seen anything more recent, and I can't see any mention of domain sockets in the documentation (unless I've overlooked it).

Is there currently any support for UNIX domain sockets in Ice, and if not, any plans to add support?

There are several reasons for wanting to use sockets, particularly in local-only contexts:
  • sockets do not require any IP networking, even local loopback.
  • socket-based services are accessible directly in the filesystem; useful for system services, user-specific services, unit testing, etc.
  • it's not subject to iptables filtering (which can be done on the loopback interfaces).
  • it's possible to authenticate/authorise users based upon the uid/gid of the user opening the socket (see e.g. postgresql's use of socket connections for auth, which can be done separately than for TCP-based connections). This is extremely useful for authenticating local users, while still gaining the benefits of using Ice for client-server interaction.
  • it permits Ice to be used for purposes which would otherwise be outside its scope, for example it could be used in tools which are used for /configuring/ networking, or as an alternative to D-Bus, both of which must function without IP networking being operational.
  • There can be performance advantages, though this is not the main reason why it's desirable.

If Ice doesn't support domain sockets directly, can it be extended to do this without any support in the core distribution?

Many thanks,


  • mes
    mes California
    Hi Roger,

    Welcome to the forum.

    Ice currently doesn't support domain sockets, although you make a pretty compelling case for it. :)

    There isn't any particular reason why we haven't added it, aside from a lack of customer demand for it.

    Note that Ice supports a transport plug-in API, so you might want to take a look at the source code for the TCP transport (TcpAcceptor, TcpConnector, TcpTransceiver, etc.). You can use these classes as a starting point for a domain socket implementation. My guess is it wouldn't be too difficult.