ap
Dependencies: DnsQuery
Dependents: WizFi310_TCP_Echo_Server_Example
Fork of NetworkSocketAPI by
Diff: TCPSocket.cpp
- Revision:
- 80:9c6673c93082
- Parent:
- 79:43a7e8c0d6cc
- Child:
- 81:1600369a29dd
diff -r 43a7e8c0d6cc -r 9c6673c93082 TCPSocket.cpp --- 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; }