Add function stubs

This commit is contained in:
Volodymyr Shymanskyy
2017-09-11 09:02:26 +03:00
parent 4d3d017600
commit 4dc0d71687

View File

@@ -149,6 +149,13 @@ public:
return sock_connected; return sock_connected;
} }
virtual operator bool() { return connected(); } virtual operator bool() { return connected(); }
/*
* Extended API
*/
String remoteIP() TINY_GSM_ATTR_NOT_IMPLEMENTED;
private: private:
TinyGsm* at; TinyGsm* at;
uint8_t mux; uint8_t mux;
@@ -435,6 +442,10 @@ public:
* Battery functions * Battery functions
*/ */
uint16_t getBattVoltage() TINY_GSM_ATTR_NOT_AVAILABLE;
int getBattPercent() TINY_GSM_ATTR_NOT_AVAILABLE;
private: private:
int modemConnect(const char* host, uint16_t port, uint8_t mux) { int modemConnect(const char* host, uint16_t port, uint8_t mux) {
@@ -570,12 +581,12 @@ public:
sockets[mux]->rx.put(stream.read()); sockets[mux]->rx.put(stream.read());
} }
data = ""; data = "";
return index;
} else if (data.endsWith(GF("+TCPCLOSE:"))) { } else if (data.endsWith(GF("+TCPCLOSE:"))) {
int mux = stream.readStringUntil(',').toInt(); int mux = stream.readStringUntil(',').toInt();
stream.readStringUntil('\n'); stream.readStringUntil('\n');
sockets[mux]->sock_connected = false; sockets[mux]->sock_connected = false;
data = ""; data = "";
DBG("### Closed: ", mux);
} }
} }
} while (millis() - startMillis < timeout); } while (millis() - startMillis < timeout);