/* we still have some queries in flight, let's just stop reading for now */
state->d_state = IncomingTCPConnectionState::State::idle;
state->d_ioState->update(IOState::Done, handleIOCallback, state);
+
+#ifdef DEBUGLOG_ENABLED
for (const auto& active : state->d_activeConnectionsToBackend) {
for (const auto& conn: active.second) {
DEBUGLOG("Connection to "<<active.first->getName()<<" is "<<(conn->isIdle() ? "idle" : "not idle"));
}
}
+#endif
}
}
#include "tcpiohandler.hh"
#if 0
+#define DEBUGLOG_ENABLED
#define DEBUGLOG(x) cerr<<x<<endl;
#else
#define DEBUGLOG(x)
return got;
}
+ bool hasBufferedData() const override
+ {
+ if (d_conn) {
+ return SSL_pending(d_conn.get()) > 0;
+ }
+
+ return false;
+ }
+
void close() override
{
if (d_conn) {
return got;
}
+ bool hasBufferedData() const override
+ {
+ if (d_conn) {
+ return gnutls_record_check_pending(d_conn.get()) > 0;
+ }
+
+ return false;
+ }
+
std::string getServerNameIndication() const override
{
if (d_conn) {
virtual size_t write(const void* buffer, size_t bufferSize, unsigned int writeTimeout) = 0;
virtual IOState tryWrite(std::vector<uint8_t>& buffer, size_t& pos, size_t toWrite) = 0;
virtual IOState tryRead(std::vector<uint8_t>& buffer, size_t& pos, size_t toRead) = 0;
+ virtual bool hasBufferedData() const = 0;
virtual std::string getServerNameIndication() const = 0;
virtual LibsslTLSVersion getTLSVersion() const = 0;
virtual bool hasSessionBeenResumed() const = 0;
}
}
+ bool hasBufferedData() const
+ {
+ if (d_conn) {
+ return d_conn->hasBufferedData();
+ }
+ return false;
+ }
+
std::string getServerNameIndication() const
{
if (d_conn) {