www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - std.socket undefined UnixAddress?

reply "Rob T" <alanb ucora.com> writes:
I'm using Linux, which supports unix domain sockets, but when I 
try to use UnixAddress it's not available.

Anyone know why?

import std.socket;

int main()
{
     Address UnixAddr = new UnixAddress( "path" ); // <- compile 
error
     return(0);
}

Error: undefined identifier UnixAddress

--rt
Jan 23 2013
parent reply "Rob T" <alanb ucora.com> writes:
On Thursday, 24 January 2013 at 06:47:41 UTC, Rob T wrote:
 I'm using Linux, which supports unix domain sockets, but when I 
 try to use UnixAddress it's not available.

 Anyone know why?

 import std.socket;

 int main()
 {
     Address UnixAddr = new UnixAddress( "path" ); // <- compile 
 error
     return(0);
 }

 Error: undefined identifier UnixAddress

 --rt
Looks like socket.d is missing this: import core.sys.posix.sys.un; I need this working asap, what's the best way to patch? Just add in the import? --rt
Jan 23 2013
parent "Rob T" <alanb ucora.com> writes:
I solved the problem by creating my own version of UnixAddress. 
The existing implementation needs some work. I'll filed a bug 
report.

http://d.puremagic.com/issues/show_bug.cgi?id=9384

--rt
Jan 24 2013