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.h
- Branch:
- api-changes
- Revision:
- 41:3ec1c97e9bbf
- Parent:
- 40:11d4a94df3f7
- Child:
- 42:49893d13c432
diff -r 11d4a94df3f7 -r 3ec1c97e9bbf NetworkInterface.h --- a/NetworkInterface.h Mon Feb 22 23:52:09 2016 -0600 +++ b/NetworkInterface.h Tue Feb 23 04:01:38 2016 -0600 @@ -70,12 +70,23 @@ * @return String MAC address of the interface */ virtual const char *getMACAddress() = 0; + + /** Set a timeout on network operations + * @param timeout Maximum time in milliseconds for socket operations + */ + virtual void setTimeout(uint32_t timeout); + + /** Get the current timeout on network operations + * @return Maximum time in milliseconds for socket operations + */ + virtual uint32_t getTimeout(); + /** Get the current status of the interface * @return true if connected */ virtual bool isConnected(void); - + /** Looks up the specified host's IP address * @param name URL of host * @param ip Buffer to hold IP address, must be at least SOCK_IP_SIZE @@ -104,6 +115,7 @@ char _ip_address[SOCK_IP_SIZE]; char _network_mask[SOCK_IP_SIZE]; char _gateway[SOCK_IP_SIZE]; + uint32_t _timeout; }; #endif