UnixSocket

Shadow_exe shadow_exe at ukr.net
Sat May 12 10:32:47 PDT 2012


module test;

import	std.conv,
	std.stdio,
	std.stdint,
	std.socket;

void main(){
	auto _masterSock = new TcpSocket(AddressFamily.UNIX);
}

When you compile everything is fine, but that's when you start 
writing the following:
root at 213:~/test# dmd test.d
root at 213:~/test# ./test
std.socket.SocketOSException at std/socket.d(164): Unable to create 
socket: Protocol not supported
----------------
./test(std.socket.TcpSocket 
std.socket.TcpSocket.__ctor(std.socket.AddressFamily)+0x15) 
[0x807cb05]
./test(_Dmain+0x15) [0x8071199]
./test(extern (C) int rt.dmain2.main(int, char**).void 
runMain()+0x14) [0x8077530]
./test(extern (C) int rt.dmain2.main(int, char**).void 
tryExec(scope void delegate())+0x18) [0x8077040]
./test(extern (C) int rt.dmain2.main(int, char**).void 
runAll()+0x32) [0x8077572]
./test(extern (C) int rt.dmain2.main(int, char**).void 
tryExec(scope void delegate())+0x18) [0x8077040]
./test(main+0x94) [0x8076ff4]
/lib/i386-linux-gnu/i686/cmov/libc.so.6(__libc_start_main+0xe6) 
[0xb760ae46]
./test() [0x80710d1]
----------------

OS:
root at 213:~/test# uname -a
Linux 213.155.28.136 2.6.32-5-686 #1 SMP Mon Mar 26 05:20:33 UTC 
2012 i686 GNU/Linux



He writes that is not supported, but why??


More information about the Digitalmars-d mailing list