| 583 | } |
| 584 | |
| 585 | void 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 | |
| 607 | void AbstractCommand::setWriteCheckSocketIf( |
| 608 | const std::shared_ptr<SocketCore>& socket, bool pred) |
nothing calls this directly
no test coverage detected