std.socket is horrible.

Pedro Rodrigues pdfrodrigues at gmail.com
Mon Aug 23 14:39:01 PDT 2010


Yes, that would most certainly help a lot.

"cemiller" <chris at dprogramming.com> wrote in message 
news:op.vhu594gqycwdcp at 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._family = af;
> }
>
>
> Socket.newFamilyObject():
> This is currently private but can be made protected to allow overriding to 
> return new address types.
>
>
> Address.name() and Address.nameLen():
> Is there a function you need to call with these? I suppose they can be 
> made public just in case they're needed elsewhere.
>
>
> As for things like _SOCKET_ERROR and _lasterr(), they're just simple 
> shortcuts to the low-level sockets. If you're working with the low-level 
> sockets, then you have access to what _SOCKET_ERROR and _lasterr() refer 
> to; otherwise, you don't need them. 



More information about the Digitalmars-d mailing list