NetworkSocketAPI
Dependents: HelloWizFi250Interface
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;