@@ -42,7 +42,7 @@ class SocketAddress {
42
42
*
43
43
* @param stack Network stack to use for DNS resolution
44
44
* @param host Hostname to resolve
45
- * @param port Optional 16-bit port
45
+ * @param port Optional 16-bit port, defaults to 0
46
46
* @deprecated
47
47
* Constructors hide possible errors. Replaced by
48
48
* NetworkInterface::gethostbyname.
@@ -57,24 +57,26 @@ class SocketAddress {
57
57
}
58
58
59
59
/* * Create a SocketAddress from a raw IP address and port
60
+ *
61
+ * To construct from a host name use NetworkInterface::gethostbyname
60
62
*
61
63
* @param addr Raw IP address
62
- * @param port Optional 16-bit port
64
+ * @param port Optional 16-bit port, defaults to 0
63
65
*/
64
66
SocketAddress (nsapi_addr_t addr = nsapi_addr_t (), uint16_t port = 0 );
65
67
66
68
/* * Create a SocketAddress from an IP address and port
67
69
*
68
70
* @param addr Null-terminated representation of the IP address
69
- * @param port Optional 16-bit port
71
+ * @param port Optional 16-bit port, defaults to 0
70
72
*/
71
73
SocketAddress (const char *addr, uint16_t port = 0 );
72
74
73
75
/* * Create a SocketAddress from raw IP bytes, IP version, and port
74
76
*
75
77
* @param bytes Raw IP address in big-endian order
76
78
* @param version IP address version, NSAPI_IPv4 or NSAPI_IPv6
77
- * @param port Optional 16-bit port
79
+ * @param port Optional 16-bit port, defaults to 0
78
80
*/
79
81
SocketAddress (const void *bytes, nsapi_version_t version, uint16_t port = 0 );
80
82
0 commit comments