Lines Matching refs:hSession
98 HSession hSession = (HSession)connection->data;
100 HdcSessionBase *ptrConnect = (HdcSessionBase *)hSession->classInstance;
106 if ((hSession->fdChildWorkTCP = Base::DuplicateUvSocket(&hSession->hWorkTCP)) < 0) {
107 WRITE_LOG(LOG_FATAL, "Connect fdChildWorkTCP:%d", hSession->fdChildWorkTCP);
110 uv_read_stop((uv_stream_t *)&hSession->hWorkTCP);
111 Base::SetTcpOptions((uv_tcp_t *)&hSession->hWorkTCP);
113 Base::StartWorkThread(&ptrConnect->loopMain, ptrConnect->SessionWorkThread, Base::FinishWorkThread, hSession);
115 while (hSession->childLoop.active_handles == 0) {
118 Base::SendToPollFd(hSession->ctrlFd[STREAM_MAIN], ctrl.data(), ctrl.size());
121 WRITE_LOG(LOG_FATAL, "Connect failed sessionId:%u", hSession->sessionId);
122 hSession->childCleared = true;
123 ptrConnect->FreeSession(hSession->sessionId);
136 HSession hSession = ptrConnect->MallocSession(true, CONN_TCP, this);
137 if (!hSession) {
138 WRITE_LOG(LOG_FATAL, "hSession nullptr connectKey:%s", Hdc::MaskString(connectKey).c_str());
141 hSession->isCheck = isCheck;
142 hSession->connectKey = connectKey;
148 delete hSession;
149 hSession = nullptr;
152 conn->data = hSession;
153 uv_tcp_connect(conn, (uv_tcp_t *)&hSession->hWorkTCP, (const struct sockaddr *)&dest, Connect);
154 return hSession;