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.
Dependents: HelloWizFi250Interface
Fork of NetworkSocketAPI by
Diff: NetworkInterface.h
- Revision:
- 13:f84e69b3fdd3
- Parent:
- 12:ab3679eb4d9d
- Child:
- 14:9e1bd182ef07
diff -r ab3679eb4d9d -r f84e69b3fdd3 NetworkInterface.h
--- a/NetworkInterface.h Thu Jul 16 05:19:17 2015 +0000
+++ b/NetworkInterface.h Fri Jul 17 23:14:01 2015 +0000
@@ -32,7 +32,7 @@
/** Initialize the network interface with DHCP.
@returns 0 on success, a negative number on failure
*/
- virtual int32_t init(void) const = 0;
+ virtual int32_t init(void) = 0;
/** Initialize the network interface with a static IP address.
@param ip The static IP address to use
@@ -40,14 +40,14 @@
@param gateway The gateway to use
@returns 0 on success, a negative number on failure
*/
- virtual int32_t init(const char *ip, const char *mask, const char *gateway) const = 0;
+ virtual int32_t init(const char *ip, const char *mask, const char *gateway) = 0;
/** Start the interface, using DHCP if needed.
@param timeout_ms Time in miliseconds to wait while attempting to connect before timing out
@returns 0 on success, a negative number on failure
*/
- virtual int32_t connect(uint32_t timeout_ms = 15000) const = 0;
+ virtual int32_t connect(uint32_t timeout_ms = 15000) = 0;
/** Stop the interface, bringing down dhcp if necessary.
@returns 0 on success, a negative number on failure
@@ -57,7 +57,7 @@
/** Get the current IP address.
@returns a pointer to a string containing the IP address.
*/
- virtual char *getIPAddress(void) const = 0;
+ virtual char *getIPAddress(void) = 0;
/** Get the current gateway address.
@returns a pointer to a string containing the gateway address.
@@ -78,19 +78,19 @@
/** Get the current status of the interface connection.
@returns true if connected, a negative number on failure
*/
- virtual int32_t isConnected(void) const = 0;
+ virtual int32_t isConnected(void) = 0;
/** Allocate space for a socket.
@param The type of socket you want to open, SOCK_TCP or SOCK_UDP
@returns a pointer to the allocated socket.
*/
- virtual SocketInterface* allocateSocket(socket_protocol_t socketProtocol) const = 0;
+ virtual SocketInterface* allocateSocket(socket_protocol_t socketProtocol) = 0;
/** Deallocate space for a socket.
@param An allocated SocketInterface
@returns 0 if object is destroyed, -1 otherwise
*/
- virtual int deallocateSocket(SocketInterface* socket) const = 0;
+ virtual int deallocateSocket(SocketInterface* socket) = 0;
protected:
/** Map used to keep track of all SocketInterface instances */
