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: ESP8266
Fork of ESP8266Interface by
Diff: ESP8266Interface.h
- Revision:
- 24:37504440f296
- Parent:
- 23:fd0f3197c30b
- Child:
- 26:6e36dd3cec3f
diff -r fd0f3197c30b -r 37504440f296 ESP8266Interface.h
--- a/ESP8266Interface.h Thu Jul 23 21:25:30 2015 +0000
+++ b/ESP8266Interface.h Sun Jul 26 21:53:45 2015 +0000
@@ -29,7 +29,7 @@
class ESP8266Socket : public SocketInterface
{
public:
- ESP8266Socket(uint32_t handle, ESP8266* driver, socket_protocol_t type, uint8_t id);
+ ESP8266Socket(uint32_t handle, ESP8266 &driver, socket_protocol_t type, uint8_t id);
virtual const char *getHostByName(const char *name) const;
virtual void setAddress(const char* addr) ;
virtual void setPort(uint16_t port) ;
@@ -43,12 +43,14 @@
virtual int32_t send(const void *data, uint32_t amount, uint32_t timeout_ms = 15000) ;
virtual uint32_t recv(void *data, uint32_t amount, uint32_t timeout_ms = 15000) ;
virtual int32_t close() const;
- uint32_t getHandle() const;
+ virtual uint32_t getHandle() const;
+
uint8_t getID();
void handleRecieve();
+
protected:
uint8_t _id;
- ESP8266* driver;
+ ESP8266* _driver;
};
/** ESP8266Interface class.
@@ -73,7 +75,7 @@
private:
ESP8266 esp8266;
- const int numSockets = 5;
+ static const int numSockets = 5;
int availableID[numSockets];
char ip[100];
};
