Merge updates from original version
Conflicts: library.json library.properties src/TinyGsmClientA6.h src/TinyGsmClientESP8266.h src/TinyGsmClientM590.h src/TinyGsmClientSIM800.h src/TinyGsmClientU201.h src/TinyGsmClientXBee.h
This commit is contained in:
@@ -80,6 +80,7 @@ public:
|
||||
|
||||
public:
|
||||
virtual int connect(const char *host, uint16_t port) {
|
||||
stop();
|
||||
TINY_GSM_YIELD();
|
||||
rx.clear();
|
||||
sock_connected = at->modemConnect(host, port, mux);
|
||||
@@ -103,6 +104,7 @@ public:
|
||||
at->sendAT(GF("+CIPCLOSE="), mux);
|
||||
sock_connected = false;
|
||||
at->waitResponse();
|
||||
rx.clear();
|
||||
}
|
||||
|
||||
virtual size_t write(const uint8_t *buf, size_t size) {
|
||||
@@ -194,6 +196,7 @@ public:
|
||||
|
||||
public:
|
||||
virtual int connect(const char *host, uint16_t port) {
|
||||
stop();
|
||||
TINY_GSM_YIELD();
|
||||
rx.clear();
|
||||
sock_connected = at->modemConnect(host, port, mux, true);
|
||||
@@ -255,7 +258,7 @@ public:
|
||||
}
|
||||
|
||||
void maintain() {
|
||||
waitResponse(10, NULL, NULL);
|
||||
waitResponse(10, NULL, NULL);
|
||||
}
|
||||
|
||||
bool factoryDefault() {
|
||||
@@ -443,12 +446,12 @@ protected:
|
||||
int modemSend(const void* buff, size_t len, uint8_t mux) {
|
||||
sendAT(GF("+CIPSEND="), mux, ',', len);
|
||||
if (waitResponse(GF(">")) != 1) {
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
stream.write((uint8_t*)buff, len);
|
||||
stream.flush();
|
||||
if (waitResponse(10000L, GF(GSM_NL "SEND OK" GSM_NL)) != 1) {
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
return len;
|
||||
}
|
||||
@@ -584,8 +587,10 @@ finish:
|
||||
return waitResponse(1000, r1, r2, r3, r4, r5);
|
||||
}
|
||||
|
||||
protected:
|
||||
public:
|
||||
Stream& stream;
|
||||
|
||||
protected:
|
||||
GsmClient* sockets[TINY_GSM_MUX_COUNT];
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user