MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / redisSSLAsyncRead

Function redisSSLAsyncRead

deps/hiredis/ssl.c:459–487  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

457}
458
459static void redisSSLAsyncRead(redisAsyncContext *ac) {
460 int rv;
461 redisSSL *rssl = ac->c.privctx;
462 redisContext *c = &ac->c;
463
464 rssl->wantRead = 0;
465
466 if (rssl->pendingWrite) {
467 int done;
468
469 /* This is probably just a write event */
470 rssl->pendingWrite = 0;
471 rv = redisBufferWrite(c, &done);
472 if (rv == REDIS_ERR) {
473 __redisAsyncDisconnect(ac);
474 return;
475 } else if (!done) {
476 _EL_ADD_WRITE(ac);
477 }
478 }
479
480 rv = redisBufferRead(c);
481 if (rv == REDIS_ERR) {
482 __redisAsyncDisconnect(ac);
483 } else {
484 _EL_ADD_READ(ac);
485 redisProcessCallbacks(ac);
486 }
487}
488
489static void redisSSLAsyncWrite(redisAsyncContext *ac) {
490 int rv, done = 0;

Callers

nothing calls this directly

Calls 4

redisBufferWriteFunction · 0.85
__redisAsyncDisconnectFunction · 0.85
redisBufferReadFunction · 0.85
redisProcessCallbacksFunction · 0.85

Tested by

no test coverage detected