Am 21.10.2011 00:12, schrieb Daniel Gibson:
Am 20.10.2011 23:44, schrieb Daniel Gibson:
Am 20.10.2011 11:37, schrieb Steve Teale:
2) We don't have an off-the-shelf Socket class for Unix Sockets

It shouldn't be too hard to add AF_UNIX support to std.socket.
(Derive something suitable from std.socket.Address and possibly
std.socket.Socket)
In fact, I have some old untested code lying around that adds such an
Address type: http://pastebin.com/gMxd4AqB

It's from D1 though and /may/ need minor changes to work with the
current std.socket. (Also it may be buggy, as it's untested)

Ok, while having a quick look at this old code I spotted the following
bugs:
1. Line 23: path[1] does not exist if path.length==1 => check length

Got it wrong again, this should work:
  if(path[0] == '\0' && (path.length==1 || path[1] == '\0'))
        return;

Need sleep.

Reply via email to