MCPcopy Create free account
hub / github.com/apache/thrift / flush

Method flush

lib/cpp/src/thrift/transport/TSSLSocket.cpp:586–605  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

584}
585
586void TSSLSocket::flush() {
587 resetConsumedMessageSize();
588 // Don't throw exception if not open. Thrift servers close socket twice.
589 if (ssl_ == nullptr) {
590 return;
591 }
592 initializeHandshake();
593 if (!checkHandshake())
594 throw TSSLException("BIO_flush: Handshake is not completed");
595 BIO* bio = SSL_get_wbio(ssl_);
596 if (bio == nullptr) {
597 throw TSSLException("SSL_get_wbio returns nullptr");
598 }
599 if (BIO_flush(bio) != 1) {
600 int errno_copy = THRIFT_GET_SOCKET_ERROR;
601 string errors;
602 buildErrors(errors, errno_copy);
603 throw TSSLException("BIO_flush: " + errors);
604 }
605}
606
607void TSSLSocket::initializeHandshakeParams() {
608 // set underlying socket to non-blocking

Callers 10

test_read_and_writeFunction · 0.45
test_read_and_writeFunction · 0.45
thrift_transport_flushFunction · 0.45
readMessageBeginMethod · 0.45
readEndMethod · 0.45
writeEndMethod · 0.45
protocol_errorMethod · 0.45

Calls 2

TSSLExceptionClass · 0.85
buildErrorsFunction · 0.85

Tested by 2

test_read_and_writeFunction · 0.36
test_read_and_writeFunction · 0.36