MCPcopy Create free account
hub / github.com/aria2/aria2 / setWriteCheckSocket

Method setWriteCheckSocket

src/AbstractCommand.cc:585–605  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

583}
584
585void AbstractCommand::setWriteCheckSocket(
586 const std::shared_ptr<SocketCore>& socket)
587{
588 if (!socket->isOpen()) {
589 disableWriteCheckSocket();
590 return;
591 }
592
593 if (checkSocketIsWritable_) {
594 if (*writeCheckTarget_ != *socket) {
595 e_->deleteSocketForWriteCheck(writeCheckTarget_, this);
596 e_->addSocketForWriteCheck(socket, this);
597 writeCheckTarget_ = socket;
598 }
599 return;
600 }
601
602 e_->addSocketForWriteCheck(socket, this);
603 checkSocketIsWritable_ = true;
604 writeCheckTarget_ = socket;
605}
606
607void AbstractCommand::setWriteCheckSocketIf(
608 const std::shared_ptr<SocketCore>& socket, bool pred)

Callers

nothing calls this directly

Calls 3

isOpenMethod · 0.45

Tested by

no test coverage detected