std.socket is horrible.

2010-08-22 Thread Daniel Gibson
Hi, I've been experimenting with passing a socket (descriptor) from one process to another (on Linux, should be the same on most POSIX systems). This may be done with ancillary messages (on local AF_UNIX sockets), which needs sendmsg() and recvmsg() and related structs and macros/functions, that

Re: std.socket is horrible.

2010-08-22 Thread Pedro Rodrigues
I've run into similar problems and also ended up having to re-implement a great part of the sockets module. A fix for these issues would be much welcomed. Regards

Re: std.socket is horrible.

2010-08-22 Thread cemiller
Would the problems be resolved with the following changes? Add a Socket class constructor: this(socket_t sock, AddressFamily af) { assert(sock != socket_t.init); this.sock = sock; this._family = af; } Socket.newFamilyObject(): This is currently private but can be made p

Re: std.socket is horrible.

2010-08-22 Thread Daniel Gibson
cemiller schrieb: Would the problems be resolved with the following changes? Add a Socket class constructor: this(socket_t sock, AddressFamily af) { assert(sock != socket_t.init); this.sock = sock; this._family = af; } Yes, this constructor would be really helpful. Socket.newFa

Re: std.socket is horrible.

2010-08-23 Thread Pedro Rodrigues
Yes, that would most certainly help a lot. "cemiller" wrote in message news:op.vhu594gqycw...@christop... Would the problems be resolved with the following changes? Add a Socket class constructor: this(socket_t sock, AddressFamily af) { assert(sock != socket_t.init); this.sock = sock; this._