@@ -181,16 +181,13 @@ string formatSocketError(int err) @trusted
181181 return " Socket error " ~ to! string (err);
182182}
183183
184- // / Retrieve the error message for the most recently encountered network error.
184+ // / Returns the error message of the most recently encountered network error.
185185@property string lastSocketError()
186186{
187187 return formatSocketError (_lasterr());
188188}
189189
190- /**
191- * Socket exceptions representing network errors reported by the operating
192- * system.
193- */
190+ // / Socket exception representing network errors reported by the operating system.
194191class SocketOSException : SocketException
195192{
196193 int errorCode; // / Platform-specific error code.
@@ -234,14 +231,14 @@ class SocketOSException: SocketException
234231 }
235232}
236233
237- // / Socket exceptions representing invalid parameters specified by user code.
234+ // / Socket exception representing invalid parameters specified by user code.
238235class SocketParameterException : SocketException
239236{
240237 mixin basicExceptionCtors;
241238}
242239
243240/**
244- * Socket exceptions representing attempts to use network capabilities not
241+ * Socket exception representing attempts to use network capabilities not
245242 * available on the current system.
246243 */
247244class SocketFeatureException : SocketException
@@ -254,7 +251,7 @@ class SocketFeatureException: SocketException
254251 * Returns:
255252 * `true` if the last socket operation failed because the socket
256253 * was in non-blocking mode and the operation would have blocked,
257- * or if the socket is in blocking mode and set a SNDTIMEO or RCVTIMEO,
254+ * or if the socket is in blocking mode and set a ` SNDTIMEO` or ` RCVTIMEO` ,
258255 * and the operation timed out.
259256 */
260257bool wouldHaveBlocked () nothrow @nogc
@@ -334,7 +331,7 @@ shared static ~this() @system nothrow @nogc
334331enum AddressFamily: ushort
335332{
336333 UNSPEC = AF_UNSPEC , // / Unspecified address family
337- UNIX = AF_UNIX , // / Local communication
334+ UNIX = AF_UNIX , // / Local communication (Unix socket)
338335 INET = AF_INET , // / Internet Protocol version 4
339336 IPX = AF_IPX , // / Novell IPX
340337 APPLETALK = AF_APPLETALK , // / AppleTalk
@@ -374,7 +371,7 @@ enum ProtocolType: int
374371
375372
376373/**
377- * `Protocol` is a class for retrieving protocol information.
374+ * Class for retrieving protocol information.
378375 *
379376 * Example:
380377 * ---
@@ -473,7 +470,7 @@ version (CRuntime_Bionic) {} else
473470
474471
475472/**
476- * `Service` is a class for retrieving service information.
473+ * Class for retrieving service information.
477474 *
478475 * Example:
479476 * ---
@@ -618,7 +615,7 @@ class HostException: SocketOSException
618615}
619616
620617/**
621- * `InternetHost` is a class for resolving IPv4 addresses.
618+ * Class for resolving IPv4 addresses.
622619 *
623620 * Consider using `getAddress`, `parseAddress` and `Address` methods
624621 * instead of using this class directly.
@@ -1220,7 +1217,7 @@ class AddressException: SocketOSException
12201217
12211218
12221219/**
1223- * `Address` is an abstract class for representing a socket addresses .
1220+ * Abstract class for representing a socket address .
12241221 *
12251222 * Example:
12261223 * ---
@@ -1402,7 +1399,7 @@ abstract class Address
14021399}
14031400
14041401/**
1405- * `UnknownAddress` encapsulates an unknown socket address.
1402+ * Encapsulates an unknown socket address.
14061403 */
14071404class UnknownAddress : Address
14081405{
@@ -1431,7 +1428,7 @@ public:
14311428
14321429
14331430/**
1434- * `UnknownAddressReference` encapsulates a reference to an arbitrary
1431+ * Encapsulates a reference to an arbitrary
14351432 * socket address.
14361433 */
14371434class UnknownAddressReference : Address
@@ -1474,8 +1471,7 @@ public:
14741471
14751472
14761473/**
1477- * `InternetAddress` encapsulates an IPv4 (Internet Protocol version 4)
1478- * socket address.
1474+ * Encapsulates an IPv4 (Internet Protocol version 4) socket address.
14791475 *
14801476 * Consider using `getAddress`, `parseAddress` and `Address` methods
14811477 * instead of using this class directly.
@@ -1624,7 +1620,8 @@ public:
16241620 }
16251621
16261622 /**
1627- * Compares with another InternetAddress of same type for equality
1623+ * Provides support for comparing equality with another
1624+ * InternetAddress of the same type.
16281625 * Returns: true if the InternetAddresses share the same address and
16291626 * port number.
16301627 */
@@ -1728,8 +1725,7 @@ public:
17281725
17291726
17301727/**
1731- * `Internet6Address` encapsulates an IPv6 (Internet Protocol version 6)
1732- * socket address.
1728+ * Encapsulates an IPv6 (Internet Protocol version 6) socket address.
17331729 *
17341730 * Consider using `getAddress`, `parseAddress` and `Address` methods
17351731 * instead of using this class directly.
@@ -1913,8 +1909,8 @@ version (StdDdoc)
19131909 }
19141910
19151911 /**
1916- * `UnixAddress` encapsulates an address for a Unix domain socket
1917- * (`AF_UNIX`), i.e. a socket bound to a path name in the file system.
1912+ * Encapsulates an address for a Unix domain socket (`AF_UNIX`),
1913+ * i.e. a socket bound to a path name in the file system.
19181914 * Available only on supported systems.
19191915 *
19201916 * Linux also supports an abstract address namespace, in which addresses
@@ -2111,7 +2107,7 @@ static if (is(sockaddr_un))
21112107
21122108
21132109/**
2114- * Class for exceptions thrown by `Socket.accept`.
2110+ * Exception thrown by `Socket.accept`.
21152111 */
21162112class SocketAcceptException : SocketOSException
21172113{
@@ -2127,7 +2123,7 @@ enum SocketShutdown: int
21272123}
21282124
21292125
2130- // / Flags may be OR'ed together:
2126+ // / Socket flags that may be OR'ed together:
21312127enum SocketFlags: int
21322128{
21332129 NONE = 0 , // / no flags specified
@@ -2622,7 +2618,7 @@ enum SocketOption: int
26222618
26232619
26242620/**
2625- * `Socket` is a class that creates a network communication endpoint using
2621+ * Class that creates a network communication endpoint using
26262622 * the Berkeley sockets interface.
26272623 */
26282624class Socket
@@ -2969,7 +2965,7 @@ public:
29692965
29702966
29712967 /**
2972- * Returns: the local machine's host name
2968+ * Returns: The local machine's host name
29732969 */
29742970 static @property string hostName() @trusted // getter
29752971 {
@@ -3518,7 +3514,7 @@ public:
35183514
35193515 /**
35203516 * Can be overridden to support other addresses.
3521- * Returns: a new `Address` object for the current address family.
3517+ * Returns: A new `Address` object for the current address family.
35223518 */
35233519 protected Address createAddress () pure nothrow
35243520 {
@@ -3549,7 +3545,7 @@ public:
35493545}
35503546
35513547
3552- // / `TcpSocket` is a shortcut class for a TCP Socket.
3548+ // / Shortcut class for a TCP Socket.
35533549class TcpSocket : Socket
35543550{
35553551 // / Constructs a blocking TCP Socket.
@@ -3566,7 +3562,7 @@ class TcpSocket: Socket
35663562
35673563
35683564 // shortcut
3569- // / Constructs a blocking TCP Socket and connects to an `Address`.
3565+ // / Constructs a blocking TCP Socket and connects to the given `Address`.
35703566 this (Address connectTo)
35713567 {
35723568 this (connectTo.addressFamily);
@@ -3575,7 +3571,7 @@ class TcpSocket: Socket
35753571}
35763572
35773573
3578- // / `UdpSocket` is a shortcut class for a UDP Socket.
3574+ // / Shortcut class for a UDP Socket.
35793575class UdpSocket : Socket
35803576{
35813577 // / Constructs a blocking UDP Socket.
0 commit comments