Ejemplo n.º 1
0
void AsyncPipeReader::failRead(const AsyncSocketException& ex) {
  VLOG(5) << "AsyncPipeReader(this=" << this << ", fd=" << fd_
          << "): failed while reading: " << ex.what();

  DCHECK(readCallback_ != nullptr);
  AsyncReader::ReadCallback* callback = readCallback_;
  readCallback_ = nullptr;
  callback->readErr(ex);
  close();
}
Ejemplo n.º 2
0
 void handshakeErr(AsyncSSLSocket* sock,
                   const AsyncSocketException& ex) noexcept override {
   auto elapsedTime = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::steady_clock::now() - acceptTime_);
   VLOG(3) << "SSL handshake error after " << elapsedTime.count() <<
       " ms; " << sock->getRawBytesReceived() << " bytes received & " <<
       sock->getRawBytesWritten() << " bytes sent: " <<
       ex.what();
   acceptor_->updateSSLStats(sock, elapsedTime, sslError_);
   acceptor_->sslConnectionError();
   delete this;
 }
void AcceptorHandshakeHelper::handshakeErr(
    AsyncSSLSocket* sock,
    const AsyncSocketException& ex) noexcept {
  auto elapsedTime =
    std::chrono::duration_cast<std::chrono::milliseconds>(
        std::chrono::steady_clock::now() - acceptTime_);
  VLOG(3) << "SSL handshake error after " << elapsedTime.count() <<
      " ms; " << sock->getRawBytesReceived() << " bytes received & " <<
      sock->getRawBytesWritten() << " bytes sent: " <<
      ex.what();
  acceptor_->updateSSLStats(sock, elapsedTime, sslError_);
  auto sslEx = folly::make_exception_wrapper<SSLException>(
      sslError_, elapsedTime, sock->getBytesRead());
  acceptor_->sslConnectionError(sslEx);
  destroy();
}
Ejemplo n.º 4
0
 void readErr(const AsyncSocketException& ex) noexcept override {
   cerr << "client readError: " << ex.what() << endl;
 }
Ejemplo n.º 5
0
 void writeErr(size_t bytesWritten, const AsyncSocketException& ex)
   noexcept override {
   cerr << "client writeError: " << ex.what() << endl;
 }
Ejemplo n.º 6
0
 void connectErr(const AsyncSocketException& ex) noexcept override
 {
   cerr << "AttachDetachClient::connectError: " << ex.what() << endl;
   sslSocket_.reset();
 }
void TcpDuplexConnection::writeErr(
    size_t bytesWritten,
    const AsyncSocketException& ex) noexcept {
  
  std::cout << "TODO writeErr" << bytesWritten << ex.what() << "\n";
}