@@ -42,30 +42,30 @@ extern "C"
42
42
43
43
uint16_t WiFiClient::_localPort = 0 ;
44
44
45
- ICACHE_FLASH_ATTR WiFiClient::WiFiClient ()
45
+ WiFiClient::WiFiClient ()
46
46
: _client(0 )
47
47
{
48
48
}
49
49
50
- ICACHE_FLASH_ATTR WiFiClient::WiFiClient (ClientContext* client) : _client(client)
50
+ WiFiClient::WiFiClient (ClientContext* client) : _client(client)
51
51
{
52
52
_client->ref ();
53
53
}
54
54
55
- ICACHE_FLASH_ATTR WiFiClient::~WiFiClient ()
55
+ WiFiClient::~WiFiClient ()
56
56
{
57
57
if (_client)
58
58
_client->unref ();
59
59
}
60
60
61
- ICACHE_FLASH_ATTR WiFiClient::WiFiClient (const WiFiClient& other)
61
+ WiFiClient::WiFiClient (const WiFiClient& other)
62
62
{
63
63
_client = other._client ;
64
64
if (_client)
65
65
_client->ref ();
66
66
}
67
67
68
- WiFiClient& ICACHE_FLASH_ATTR WiFiClient::operator =(const WiFiClient& other)
68
+ WiFiClient& WiFiClient::operator =(const WiFiClient& other)
69
69
{
70
70
if (_client)
71
71
_client->unref ();
@@ -76,7 +76,7 @@ WiFiClient& ICACHE_FLASH_ATTR WiFiClient::operator=(const WiFiClient& other)
76
76
}
77
77
78
78
79
- int ICACHE_FLASH_ATTR WiFiClient::connect (const char * host, uint16_t port)
79
+ int WiFiClient::connect (const char * host, uint16_t port)
80
80
{
81
81
IPAddress remote_addr;
82
82
if (WiFi.hostByName (host, remote_addr))
@@ -86,7 +86,7 @@ int ICACHE_FLASH_ATTR WiFiClient::connect(const char* host, uint16_t port)
86
86
return 0 ;
87
87
}
88
88
89
- int ICACHE_FLASH_ATTR WiFiClient::connect (IPAddress ip, uint16_t port)
89
+ int WiFiClient::connect (IPAddress ip, uint16_t port)
90
90
{
91
91
if (_client)
92
92
stop ();
@@ -114,7 +114,7 @@ int ICACHE_FLASH_ATTR WiFiClient::connect(IPAddress ip, uint16_t port)
114
114
return 0 ;
115
115
}
116
116
117
- int8_t ICACHE_FLASH_ATTR WiFiClient::_connected (void * pcb, int8_t err)
117
+ int8_t WiFiClient::_connected (void * pcb, int8_t err)
118
118
{
119
119
tcp_pcb* tpcb = reinterpret_cast <tcp_pcb*>(pcb);
120
120
_client = new ClientContext (tpcb, 0 , 0 );
@@ -123,31 +123,31 @@ int8_t ICACHE_FLASH_ATTR WiFiClient::_connected(void* pcb, int8_t err)
123
123
return ERR_OK;
124
124
}
125
125
126
- void ICACHE_FLASH_ATTR WiFiClient::_err (int8_t err)
126
+ void WiFiClient::_err (int8_t err)
127
127
{
128
128
DEBUGV (" :err %d\r\n " , err);
129
129
esp_schedule ();
130
130
}
131
131
132
132
133
- void ICACHE_FLASH_ATTR WiFiClient::setNoDelay (bool nodelay) {
133
+ void WiFiClient::setNoDelay (bool nodelay) {
134
134
if (!_client)
135
135
return ;
136
136
_client->setNoDelay (nodelay);
137
137
}
138
138
139
- bool ICACHE_FLASH_ATTR WiFiClient::getNoDelay () {
139
+ bool WiFiClient::getNoDelay () {
140
140
if (!_client)
141
141
return false ;
142
142
return _client->getNoDelay ();
143
143
}
144
144
145
- size_t ICACHE_FLASH_ATTR WiFiClient::write (uint8_t b)
145
+ size_t WiFiClient::write (uint8_t b)
146
146
{
147
147
return write (&b, 1 );
148
148
}
149
149
150
- size_t ICACHE_FLASH_ATTR WiFiClient::write (const uint8_t *buf, size_t size)
150
+ size_t WiFiClient::write (const uint8_t *buf, size_t size)
151
151
{
152
152
if (!_client || !size)
153
153
{
@@ -159,7 +159,7 @@ size_t ICACHE_FLASH_ATTR WiFiClient::write(const uint8_t *buf, size_t size)
159
159
160
160
extern " C" uint32_t esp_micros_at_task_start ();
161
161
162
- int ICACHE_FLASH_ATTR WiFiClient::available ()
162
+ int WiFiClient::available ()
163
163
{
164
164
static uint32_t lastPollTime = 0 ;
165
165
if (!_client)
@@ -174,7 +174,7 @@ int ICACHE_FLASH_ATTR WiFiClient::available()
174
174
return result;
175
175
}
176
176
177
- int ICACHE_FLASH_ATTR WiFiClient::read ()
177
+ int WiFiClient::read ()
178
178
{
179
179
if (!available ())
180
180
return -1 ;
@@ -183,26 +183,26 @@ int ICACHE_FLASH_ATTR WiFiClient::read()
183
183
}
184
184
185
185
186
- int ICACHE_FLASH_ATTR WiFiClient::read (uint8_t * buf, size_t size)
186
+ int WiFiClient::read (uint8_t * buf, size_t size)
187
187
{
188
188
return (int ) _client->read (reinterpret_cast <char *>(buf), size);
189
189
}
190
190
191
- int ICACHE_FLASH_ATTR WiFiClient::peek ()
191
+ int WiFiClient::peek ()
192
192
{
193
193
if (!available ())
194
194
return -1 ;
195
195
196
196
return _client->peek ();
197
197
}
198
198
199
- void ICACHE_FLASH_ATTR WiFiClient::flush ()
199
+ void WiFiClient::flush ()
200
200
{
201
201
if (_client)
202
202
_client->flush ();
203
203
}
204
204
205
- void ICACHE_FLASH_ATTR WiFiClient::stop ()
205
+ void WiFiClient::stop ()
206
206
{
207
207
if (!_client)
208
208
return ;
@@ -211,22 +211,22 @@ void ICACHE_FLASH_ATTR WiFiClient::stop()
211
211
_client = 0 ;
212
212
}
213
213
214
- uint8_t ICACHE_FLASH_ATTR WiFiClient::connected ()
214
+ uint8_t WiFiClient::connected ()
215
215
{
216
216
if (!_client)
217
217
return 0 ;
218
218
219
219
return _client->state () == ESTABLISHED || available ();
220
220
}
221
221
222
- uint8_t ICACHE_FLASH_ATTR WiFiClient::status ()
222
+ uint8_t WiFiClient::status ()
223
223
{
224
224
if (!_client)
225
225
return CLOSED;
226
226
return _client->state ();
227
227
}
228
228
229
- ICACHE_FLASH_ATTR WiFiClient::operator bool ()
229
+ WiFiClient::operator bool ()
230
230
{
231
231
return _client != 0 ;
232
232
}
@@ -247,12 +247,12 @@ uint16_t WiFiClient::remotePort()
247
247
return _client->getRemotePort ();
248
248
}
249
249
250
- int8_t ICACHE_FLASH_ATTR WiFiClient::_s_connected (void * arg, void * tpcb, int8_t err)
250
+ int8_t WiFiClient::_s_connected (void * arg, void * tpcb, int8_t err)
251
251
{
252
252
return reinterpret_cast <WiFiClient*>(arg)->_connected (tpcb, err);
253
253
}
254
254
255
- void ICACHE_FLASH_ATTR WiFiClient::_s_err (void * arg, int8_t err)
255
+ void WiFiClient::_s_err (void * arg, int8_t err)
256
256
{
257
257
reinterpret_cast <WiFiClient*>(arg)->_err (err);
258
258
}
0 commit comments