www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 597] New: std.socket TcpSocket and UdpSocket are missing.

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=597

           Summary: std.socket TcpSocket and UdpSocket are missing.
           Product: D
           Version: 0.175
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: godaves yahoo.com


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);
      }
}


-- 
Nov 25 2006
next sibling parent reply "Chris Miller" <chris dprogramming.com> writes:
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.
Nov 25 2006
parent Walter Bright <newshound digitalmars.com> writes:
Chris Miller wrote:
 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.
It's a stupid editing mistake on my part.
Nov 26 2006
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=597


deewiant gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED





Fixed in DMD 0.176.


-- 
Dec 03 2006