MCPcopy Create free account
hub / github.com/BlueAndi/Pixelix / addPayload

Method addPayload

lib/AsyncHttpClient/src/HttpResponse.cpp:193–213  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

191}
192
193bool HttpResponse::addPayload(const uint8_t* payload, size_t size)
194{
195 bool isSuccess = false;
196
197 if ((nullptr == m_payload) ||
198 ((m_size - m_wrIndex) < size))
199 {
200 (void)extendPayload(size);
201 }
202
203 if ((nullptr != m_payload) &&
204 ((m_size - m_wrIndex) >= size))
205 {
206 memcpy(&m_payload[m_wrIndex], payload, size);
207 m_wrIndex += size;
208
209 isSuccess = true;
210 }
211
212 return isSuccess;
213}
214
215String HttpResponse::getHttpVersion() const
216{

Callers 2

onDataMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected