[Telepathy] Review: telepathy-spec-stream

Dafydd Harries dafydd.harries at collabora.co.uk
Mon Jun 4 05:20:08 PDT 2007


Ar 04/06/2007 am 15:17, ysgrifennodd Robert McQueen:
> Dafydd Harries wrote:
> > Ar 04/06/2007 am 11:49, ysgrifennodd Simon McVittie:
> >> - - Non-abstract sockets are identified by arbitrary Unix paths. A Unix
> >>   path is defined as a byte-string, which need not be in any particular
> >>   character set, or even in a consistent character set - "/tmp/\xff\x99" is a
> >>   valid Unix path. D-Bus strings, on the other hand, are defined to be
> >>   sequences of nonzero Unicode characters, encoded in UTF-8. I don't
> >>   feel like defining a mapping from one to the other if we could just be
> >>   using a byte-array and avoiding the issue completely.
> > 
> > I think this part is not a problem: we can just require that your paths are
> > valid UTF-8. But unless we specify a way of indicating abstractness other than
> > having a null leading byte then we will need ay for addresses.
> 
> More generally I'm concerned that these tubes are totally specific to
> PROTO_UNIX addresses, why can't we have a slightly more generic naming
> scheme and make them appropriate for any kind of address that's
> applicable to SOCK_STREAM sockets? Aside from the addressing, very
> similar code should be usable for localhost TCP sockets.

Either:

 - have separate methods for different kinds of addresses
   (GetStreamAbstractUnixSocketAddress, GetStreamUnixSocketAaddress,
   GetStreamTCPSocketAddress, ...)

 - use something like D-Bus' addresing scheme
   ("unix:abstract=/tmp/dbus-nddS834B6w", "unix:path=/tmp/dbus-nddS834B6w",
   "tcp:host=blah,port=3456")

I'm not sure that tcp: stuff is what D-Bus actually uses.

In any case, it's possible that the CM you're using only supports a subset of
the socket types available on the system, so it would be good to have a way to
find out which kinds of socket the CM supports.

-- 
Dafydd


More information about the Telepathy mailing list