597 – std.socket TcpSocket and UdpSocket are missing.

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 597 - std.socket TcpSocket and UdpSocket are missing.
Summary: std.socket TcpSocket and UdpSocket are missing.
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D1 (retired)
Hardware: All All
: P2 normal
Assignee: Walter Bright
URL:
Keywords:
Depends on:
Blocks:
Reported: 2006年11月25日 12:05 UTC by Dave
Modified: 2014年02月15日 13:29 UTC (History)
0 users

See Also:


Attachments
Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this issue.
Description Dave 2006年11月25日 12:05:09 UTC
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 Chris Miller 2006年11月26日 01:41:13 UTC
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 Matti Niemenmaa 2006年12月03日 04:07:40 UTC
Fixed in DMD 0.176.


AltStyle によって変換されたページ (->オリジナル) /