Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

std.socket: reword InternetAddress constructor DDoc

  • Loading branch information...
commit 88a90251d6df0643c4399a1947ebc82b6eb463e0 1 parent 15b8d62
@CyberShadow authored
Showing with 8 additions and 6 deletions.
  1. +8 −6 std/socket.d
View
14 std/socket.d
@@ -1158,11 +1158,12 @@ public:
}
/**
+ * Construct a new $(D InternetAddress).
* Params:
* addr = an IPv4 address string in the dotted-decimal form a.b.c.d,
- * or a host name that will be resolved using an $(D InternetHost)
+ * or a host name which will be resolved using an $(D InternetHost)
* object.
- * port = may be $(D PORT_ANY) as stated below.
+ * port = port number, may be $(D PORT_ANY).
*/
this(string addr, uint16_t port)
{
@@ -1182,9 +1183,10 @@ public:
}
/**
- * Construct a new $(D Address). $(D addr) may be $(D ADDR_ANY) (default)
- * and $(D port) may be $(D PORT_ANY), and the actual numbers may not be
- * known until a connection is made.
+ * Construct a new $(D InternetAddress).
+ * Params:
+ * addr = (optional) an IPv4 address in host byte order, may be $(D ADDR_ANY).
+ * port = port number, may be $(D PORT_ANY).
*/
this(uint32_t addr, uint16_t port)
{
@@ -1197,7 +1199,7 @@ public:
this(uint16_t port)
{
sin.sin_family = AddressFamily.INET;
- sin.sin_addr.s_addr = INADDR_ANY;
+ sin.sin_addr.s_addr = ADDR_ANY;
sin.sin_port = htons(port);
}
Please sign in to comment.
Something went wrong with that request. Please try again.