Skip to content

Explain default port number, and construction #8512

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 24, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions features/netsocket/SocketAddress.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class SocketAddress {
*
* @param stack Network stack to use for DNS resolution
* @param host Hostname to resolve
* @param port Optional 16-bit port
* @param port Optional 16-bit port, defaults to 0
* @deprecated
* Constructors hide possible errors. Replaced by
* NetworkInterface::gethostbyname.
Expand All @@ -57,24 +57,26 @@ class SocketAddress {
}

/** Create a SocketAddress from a raw IP address and port
*
* To construct from a host name, use NetworkInterface::gethostbyname
*
* @param addr Raw IP address
* @param port Optional 16-bit port
* @param port Optional 16-bit port, defaults to 0
*/
SocketAddress(nsapi_addr_t addr = nsapi_addr_t(), uint16_t port = 0);

/** Create a SocketAddress from an IP address and port
*
* @param addr Null-terminated representation of the IP address
* @param port Optional 16-bit port
* @param port Optional 16-bit port, defaults to 0
*/
SocketAddress(const char *addr, uint16_t port = 0);

/** Create a SocketAddress from raw IP bytes, IP version, and port
*
* @param bytes Raw IP address in big-endian order
* @param version IP address version, NSAPI_IPv4 or NSAPI_IPv6
* @param port Optional 16-bit port
* @param port Optional 16-bit port, defaults to 0
*/
SocketAddress(const void *bytes, nsapi_version_t version, uint16_t port = 0);

Expand Down