Bug 597 – std.socket TcpSocket and UdpSocket are missing.

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D1 (retired)
Platform
All
OS
All
Creation time
2006-11-25T12:05:00Z
Last change time
2014-02-15T13:29:06Z
Assigned to
bugzilla
Creator
godaves

Comments

Comment #0 by godaves — 2006-11-25T12:05:09Z
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); } }
Comment #1 by chris — 2006-11-26T01:41:13Z
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.
Comment #2 by matti.niemenmaa+dbugzilla — 2006-12-03T04:07:40Z
Fixed in DMD 0.176.