Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: DnsQuery
Fork of NetworkSocketAPI by
Diff: TCPSocket.cpp
- Revision:
- 8:9c6673c93082
- Parent:
- 7:43a7e8c0d6cc
- Child:
- 9:1600369a29dd
--- a/TCPSocket.cpp Tue Apr 05 10:40:34 2016 -0500
+++ b/TCPSocket.cpp Tue Apr 05 12:02:56 2016 -0500
@@ -21,7 +21,7 @@
{
}
-int TCPSocket::connect(SocketAddress addr)
+int TCPSocket::connect(const SocketAddress &addr)
{
if (!_socket) {
return NSAPI_ERROR_NO_SOCKET;
@@ -32,7 +32,7 @@
int TCPSocket::connect(const char *host, uint16_t port)
{
- SocketAddress addr = _iface->gethostbyname(host, port);
+ SocketAddress addr(_iface, host, port);
if (!addr.get_ip_address()) {
return NSAPI_ERROR_DNS_FAILURE;
}
