Skip to content

Commit fccdfaf

Browse files
committed
Rename waitforConnect() to waitForConnect()
1 parent 797c95f commit fccdfaf

File tree

8 files changed

+21
-9
lines changed

8 files changed

+21
-9
lines changed

examples/application/soracom-gps-tracker/CellularTask.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ static bool send(const void* data, size_t dataSize) {
157157
return false;
158158
}
159159

160-
if (!client.waitforConnect()) {
160+
if (!client.waitForConnect()) {
161161
Serial.printf(TASK_NAME "ERROR: Failed to connect %s\n", WioCellularResultToString(client.getLastResult()));
162162
return false;
163163
}

examples/cellular/shell/shell.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ static int CommandSocketOpen(int argc, char **argv) {
332332
return 1;
333333
}
334334

335-
if (!TcpClient->waitforConnect()) {
335+
if (!TcpClient->waitForConnect()) {
336336
TcpClient.reset();
337337
Serial.printf("Failed to connect. %s\n", WioCellularResultToString(TcpClient->getLastResult()));
338338
return 1;

examples/soracom/soracom-uptime-off/soracom-uptime-off.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ static bool send(const JsonDocument &doc) {
121121
return false;
122122
}
123123

124-
if (!client.waitforConnect(CONNECT_TIMEOUT)) {
124+
if (!client.waitForConnect(CONNECT_TIMEOUT)) {
125125
Serial.printf("ERROR: Failed to connect %s\n", WioCellularResultToString(client.getLastResult()));
126126
return false;
127127
}

examples/soracom/soracom-uptime-psm/soracom-uptime-psm.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ static bool send(const JsonDocument &doc) {
143143
return false;
144144
}
145145

146-
if (!client.waitforConnect(CONNECT_TIMEOUT)) {
146+
if (!client.waitForConnect(CONNECT_TIMEOUT)) {
147147
Serial.printf("ERROR: Failed to connect %s\n", WioCellularResultToString(client.getLastResult()));
148148
return false;
149149
}

examples/soracom/soracom-uptime/soracom-uptime.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ static bool send(const JsonDocument &doc) {
115115
return false;
116116
}
117117

118-
if (!client.waitforConnect(CONNECT_TIMEOUT)) {
118+
if (!client.waitForConnect(CONNECT_TIMEOUT)) {
119119
Serial.printf("ERROR: Failed to connect %s\n", WioCellularResultToString(client.getLastResult()));
120120
return false;
121121
}

src/client/WioCellularArduinoTcpClient.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ class WioCellularArduinoTcpClient : public Client
113113
if (!TcpClient_.open(PdpContextId_, host, port))
114114
return 0;
115115

116-
if (!TcpClient_.waitforConnect(ConnectionTimeout_))
116+
if (!TcpClient_.waitForConnect(ConnectionTimeout_))
117117
{
118118
TcpClient_.close();
119119
return 0;

src/client/WioCellularTcpClient2.hpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ namespace wiocellular::client
241241
* 永久に待機したいときはtimeoutに-1を指定します。
242242
* エラーの詳細をgetLastResult()で取得できます。
243243
*/
244-
bool waitforConnect(int timeout = 150000)
244+
bool waitForConnect(int timeout = 150000)
245245
{
246246
if (getState() != State::Opened)
247247
{
@@ -265,6 +265,12 @@ namespace wiocellular::client
265265
return true;
266266
}
267267

268+
[[deprecated("Use waitForConnect() instead.")]]
269+
bool waitforConnect(int timeout = 150000)
270+
{
271+
return waitForConnect(timeout);
272+
}
273+
268274
/**
269275
* @~Japanese
270276
* @brief クローズ

src/client/WioCellularUdpClient2.hpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,13 +226,13 @@ namespace wiocellular::client
226226
* UDPクライアントの接続完了を待機します。
227227
* 永久に待機したいときはtimeoutに-1を指定します。
228228
* エラーの詳細をgetLastResult()で取得できます。
229-
*
229+
*
230230
* @note
231231
* UDPには接続という概念はありませんが、モジュールとのやりとりにはオープンと接続があります。
232232
* そのため、UDPであっても接続完了を待機しなければいけません。
233233
* なお、オープンのときにドメイン名の名前解決の送受信が発生しますが、接続処理として送受信は発生しません。
234234
*/
235-
bool waitforConnect(int timeout = 150000)
235+
bool waitForConnect(int timeout = 150000)
236236
{
237237
if (getState() != State::Opened)
238238
{
@@ -256,6 +256,12 @@ namespace wiocellular::client
256256
return true;
257257
}
258258

259+
[[deprecated("Use waitForConnect() instead.")]]
260+
bool waitforConnect(int timeout = 150000)
261+
{
262+
return waitForConnect(timeout);
263+
}
264+
259265
/**
260266
* @~Japanese
261267
* @brief クローズ

0 commit comments

Comments
 (0)