[Phobos] A new constructor is needed in std.socket.Socket

Regan Heath regan at netmail.co.nz
Thu May 24 08:56:28 PDT 2007


Dejan Lekic Wrote:
> It is IMHO very important to have a constructor in std.socket.Socket which takes a FILE DESCRIPTOR as an argument and makes socket out of it.

Isn't it sufficient to have a setter method to set the handle?

Something to go with the existing getter method that returns the raw socket handle:

socket_t handle(); 
  Get underlying socket handle. 

Once you had that you could subclass (as you have done) calling the setter in your constructor, no?

Regan




More information about the Digitalmars-d mailing list