Thread overview
[Issue 597] New: std.socket TcpSocket and UdpSocket are missing.
Nov 25, 2006
d-bugmail
Nov 26, 2006
Chris Miller
Nov 26, 2006
Walter Bright
Dec 03, 2006
d-bugmail
November 25, 2006
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);
      }
}


-- 

November 26, 2006
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.
November 26, 2006
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.
December 03, 2006
http://d.puremagic.com/issues/show_bug.cgi?id=597


deewiant@gmail.com changed:

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




------- Comment #2 from deewiant@gmail.com  2006-12-03 04:07 -------
Fixed in DMD 0.176.


--