int ProxyConn::doWrite() { int ret; if ((m_iSsl) && (!m_ssl.isConnected())) { ret = connectSSL(); if (ret != 1) return ret; } if (getConnector()) { int state = getConnector()->getState(); if ((!state) || (state & (HEC_FWD_REQ_HEADER | HEC_FWD_REQ_BODY))) { int ret = getConnector()->extOutputReady(); if (getState() == ABORT) { if (getConnector()) { incReqProcessed(); getConnector()->endResponse(0, 0); } } return ret; } } if (m_iTotalPending > 0) return flush(); else suspendWrite(); return 0; }
void SecureSocketImpl::connectNB(const SocketAddress& address) { if (_pSSL) reset(); poco_assert (!_pSSL); _pSocket->connectNB(address); connectSSL(false); }
void SecureSocketImpl::connect(const SocketAddress& address, bool performHandshake) { if (_pSSL) reset(); poco_assert (!_pSSL); _pSocket->connect(address); connectSSL(performHandshake); }
void SecureSocketImpl::connect(const SocketAddress& address, const Poco::Timespan& timeout, bool performHandshake) { if (_pSSL) reset(); poco_assert (!_pSSL); _pSocket->connect(address, timeout); connectSSL(performHandshake); }
void SecureSocketImpl::connect(const SocketAddress& address, const Poco::Timespan& timeout, bool performHandshake) { if (_pSSL) reset(); poco_assert (!_pSSL); _pSocket->connect(address, timeout); Poco::Timespan receiveTimeout = _pSocket->getReceiveTimeout(); Poco::Timespan sendTimeout = _pSocket->getSendTimeout(); _pSocket->setReceiveTimeout(timeout); _pSocket->setSendTimeout(timeout); connectSSL(performHandshake); _pSocket->setReceiveTimeout(receiveTimeout); _pSocket->setSendTimeout(sendTimeout); }
int ProxyConn::doRead() { int ret; LS_DBG_L(this, "ProxyConn::doRead()"); if ((m_iSsl) && (!m_ssl.isConnected())) { ret = connectSSL(); if (ret != 1) return ret; return doWrite(); } ret = processResp(); if (getState() == ABORT) { if (getConnector()) { incReqProcessed(); getConnector()->endResponse(0, 0); } } return ret; }