MCPcopy Create free account
hub / github.com/defold/defold / SetOptionInt

Function SetOptionInt

engine/dlib/src/dlib/http_client.cpp:337–362  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

335 }
336
337 Result SetOptionInt(HClient client, Option option, int64_t value)
338 {
339 switch (option) {
340 case OPTION_MAX_GET_RETRIES:
341 if (value < 1)
342 return RESULT_INVAL_ERROR;
343 client->m_MaxGetRetries = (int) value;
344 break;
345 case OPTION_REQUEST_TIMEOUT:
346 client->m_RequestTimeout = (int) value;
347 break;
348 case OPTION_REQUEST_IGNORE_CACHE:
349#if defined(DM_NO_HTTP_CACHE)
350 client->m_IgnoreCache = 1;
351#else
352 client->m_IgnoreCache = value != 0 ? 1 : 0;
353#endif
354 break;
355 case OPTION_REQUEST_CHUNKED_TRANSFER:
356 client->m_ChunkedTransfer = value != 0 ? 1 : 0;
357 break;
358 default:
359 return RESULT_INVAL_ERROR;
360 }
361 return RESULT_OK;
362 }
363
364 void Delete(HClient client)
365 {

Callers 4

HandleRequestFunction · 0.85
TEST_PFunction · 0.85

Calls

no outgoing calls

Tested by 3

TEST_PFunction · 0.68