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
Dependents: WizFi310_TCP_Echo_Server_Example
Fork of NetworkSocketAPI by
Diff: NetworkInterface.cpp
- Branch:
- api-changes
- Revision:
- 41:3ec1c97e9bbf
- Parent:
- 39:47138420ea42
- Child:
- 42:49893d13c432
--- a/NetworkInterface.cpp Mon Feb 22 23:52:09 2016 -0600 +++ b/NetworkInterface.cpp Tue Feb 23 04:01:38 2016 -0600 @@ -20,6 +20,7 @@ #include <string.h> NetworkInterface::NetworkInterface() + : _timeout(15000) { memset(_ip_address, 0, SOCK_IP_SIZE); memset(_network_mask, 0, SOCK_IP_SIZE); @@ -75,6 +76,16 @@ } } +void NetworkInterface::setTimeout(uint32_t timeout) +{ + _timeout = timeout; +} + +uint32_t NetworkInterface::getTimeout() +{ + return _timeout; +} + bool NetworkInterface::isConnected() { return getIPAddress() != 0;