| 139 | } |
| 140 | |
| 141 | bool AbstractCommand::shouldProcess() const |
| 142 | { |
| 143 | if (checkSocketIsReadable_) { |
| 144 | if (readEventEnabled()) { |
| 145 | return true; |
| 146 | } |
| 147 | |
| 148 | if (socketRecvBuffer_ && !socketRecvBuffer_->bufferEmpty()) { |
| 149 | return true; |
| 150 | } |
| 151 | |
| 152 | if (socket_ && socket_->getRecvBufferedLength()) { |
| 153 | return true; |
| 154 | } |
| 155 | } |
| 156 | |
| 157 | if (checkSocketIsWritable_ && writeEventEnabled()) { |
| 158 | return true; |
| 159 | } |
| 160 | |
| 161 | #ifdef ENABLE_ASYNC_DNS |
| 162 | const auto resolverChecked = asyncNameResolverMan_->resolverChecked(); |
| 163 | if (resolverChecked && asyncNameResolverMan_->getStatus() != 0) { |
| 164 | return true; |
| 165 | } |
| 166 | |
| 167 | if (!checkSocketIsReadable_ && !checkSocketIsWritable_ && !resolverChecked) { |
| 168 | return true; |
| 169 | } |
| 170 | #else // ENABLE_ASYNC_DNS |
| 171 | if (!checkSocketIsReadable_ && !checkSocketIsWritable_) { |
| 172 | return true; |
| 173 | } |
| 174 | #endif // ENABLE_ASYNC_DNS |
| 175 | |
| 176 | return noCheck(); |
| 177 | } |
| 178 | |
| 179 | bool AbstractCommand::execute() |
| 180 | { |
nothing calls this directly
no test coverage detected