Log success/failure of HTTP requests
authorKyle Fuller <redacted>
Fri, 4 Sep 2015 02:09:10 +0000 (19:09 -0700)
committerKyle Fuller <redacted>
Fri, 4 Sep 2015 02:09:10 +0000 (19:09 -0700)
palaver.cpp

index 82011587b0b2dbd8af1303aafd3850a7a5648d7e..b71f57ec5fbade878b37ac72e14580b7ac7b3189 100644 (file)
@@ -143,6 +143,8 @@ public:
 
                                if (uStatus < 200 || uStatus > 299) {
                                        DEBUG("Palaver: Received HTTP Response code: " << uStatus);
+                               } else {
+                                       DEBUG("Palaver: Successfully send notification ('" << uStatus << "')");
                                }
 
                                m_eState = Headers;
@@ -171,6 +173,18 @@ public:
                Close(CSocket::CLT_AFTERWRITE);
        }
 
+       void Timeout() {
+               DEBUG("Palaver: HTTP Request timed out '" << m_sHostname << "'");
+       }
+
+       void ConnectionRefused() {
+               DEBUG("Palaver: Connection refused to '" << m_sHostname << "'");
+       }
+
+       virtual void SockError(int iErrno, const CString &sDescription) {
+               DEBUG("Palaver: HTTP Request failed '" << m_sHostname << "' - " << sDescription);
+       }
+
        virtual bool SNIConfigureClient(CS_STRING &sHostname) {
                sHostname = m_sHostname;
                return true;
git clone https://git.99rst.org/PROJECT