Somehow this code disappeared from the end of std/socket.d between 0.174 and 0.175: /// TcpSocket is a shortcut class for a TCP Socket. class TcpSocket: Socket { /// Constructs a blocking TCP Socket. this(AddressFamily family) { super(family, SocketType.STREAM, ProtocolType.TCP); } /// Constructs a blocking TCP Socket. this() { this(cast(AddressFamily)AddressFamily.INET); } //shortcut /// Constructs a blocking TCP Socket and connects to an InternetAddress. this(Address connectTo) { this(connectTo.addressFamily()); connect(connectTo); } } /// UdpSocket is a shortcut class for a UDP Socket. class UdpSocket: Socket { /// Constructs a blocking UDP Socket. this(AddressFamily family) { super(family, SocketType.DGRAM, ProtocolType.UDP); } /// Constructs a blocking UDP Socket. this() { this(cast(AddressFamily)AddressFamily.INET); } }
I hope this wasn't intentional. They weren't even deprecated if so? These classes can be very handy. It's like removing the std.file read/write functions because there's Stream/File.
Fixed in DMD 0.176.
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル