Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d95d934

Browse filesBrowse files
committed
GSMClient: retry write
1 parent 31759bd commit d95d934
Copy full SHA for d95d934

File tree

2 files changed

+39
-0
lines changed
Filter options

2 files changed

+39
-0
lines changed

‎libraries/GSM/src/GSMClient.h

Copy file name to clipboardExpand all lines: libraries/GSM/src/GSMClient.h
+20Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,29 @@
2626
namespace arduino {
2727

2828
class GSMClient : public AClient {
29+
private:
2930
NetworkInterface *getNetwork() {
3031
return GSM.getNetwork();
3132
}
33+
34+
public:
35+
size_t write(uint8_t b) {
36+
int ret = 0;
37+
do {
38+
ret = client->write(b);
39+
delay(0);
40+
} while (ret == 0 && status());
41+
return ret;
42+
}
43+
44+
size_t write(const uint8_t *buf, size_t size) {
45+
int ret = 0;
46+
do {
47+
ret = client->write(buf, size);
48+
delay(0);
49+
} while (ret == 0 && status());
50+
return ret;
51+
}
3252
};
3353

3454
}

‎libraries/GSM/src/GSMSSLClient.h

Copy file name to clipboardExpand all lines: libraries/GSM/src/GSMSSLClient.h
+19Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,25 @@ class GSMSSLClient : public arduino::ASslClient {
3232
NetworkInterface *getNetwork() {
3333
return GSM.getNetwork();
3434
}
35+
36+
public:
37+
size_t write(uint8_t b) {
38+
int ret = 0;
39+
do {
40+
ret = client->write(b);
41+
delay(0);
42+
} while (ret == 0 && status());
43+
return ret;
44+
}
45+
46+
size_t write(const uint8_t *buf, size_t size) {
47+
int ret = 0;
48+
do {
49+
ret = client->write(buf, size);
50+
delay(0);
51+
} while (ret == 0 && status());
52+
return ret;
53+
}
3554
};
3655

3756
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.