| 8405 | } |
| 8406 | |
| 8407 | void |
| 8408 | TSVConnReenableEx(TSVConn vconn, TSEvent event) |
| 8409 | { |
| 8410 | NetVConnection *vc = reinterpret_cast<NetVConnection *>(vconn); |
| 8411 | |
| 8412 | if (auto tes = vc->get_service<TLSEventSupport>(); tes) { |
| 8413 | EThread *eth = this_ethread(); |
| 8414 | |
| 8415 | // We use the mutex of VC's NetHandler so we can put the VC into ready_list by reenable() |
| 8416 | Ptr<ProxyMutex> m = tes->getMutexForTLSEvents(); |
| 8417 | MUTEX_TRY_LOCK(trylock, m, eth); |
| 8418 | if (trylock.is_locked()) { |
| 8419 | tes->reenable(event); |
| 8420 | } else { |
| 8421 | // We schedule the reenable to the home thread of ssl_vc. |
| 8422 | tes->getThreadForTLSEvents()->schedule_imm(new TSSslCallback(tes, event)); |
| 8423 | } |
| 8424 | } |
| 8425 | } |
| 8426 | |
| 8427 | TSReturnCode |
| 8428 | TSVConnPPInfoGet(TSVConn vconn, uint16_t key, const char **value, int *length) |