• Home
  • Raw
  • Download

Lines Matching refs:hChannel

539     HChannel hChannel = sfc->AdminChannel(OP_QUERY_REF, channelId, nullptr);  in FetchCommand()  local
540 if (!hChannel) { in FetchCommand()
553 if (hChannel->isDead) { in FetchCommand()
554 --hChannel->ref; in FetchCommand()
559 sfc->EchoClientRaw(hChannel, payload, payloadSize); in FetchCommand()
565 sfc->EchoClient(hChannel, level, s.c_str()); in FetchCommand()
591 Base::TryCloseHandle((uv_handle_t *)&hChannel->hChildWorkTCP); // detch client channel in FetchCommand()
606 if (hChannel->fromClient) { in FetchCommand()
612 sfc->SendCommandToClient(hChannel, command, payload, payloadSize); in FetchCommand()
616 HSession hSessionByQuery = AdminSession(OP_QUERY, hChannel->targetSessionId, nullptr); in FetchCommand()
625 --hChannel->ref; in FetchCommand()
866 HChannel hChannel = hSfc->AdminChannel(OP_QUERY_REF, channelId, nullptr); in AttachChannel() local
867 if (!hChannel) { in AttachChannel()
870 uv_tcp_init(&hSession->childLoop, &hChannel->hChildWorkTCP); in AttachChannel()
871 hChannel->hChildWorkTCP.data = hChannel; in AttachChannel()
872 hChannel->targetSessionId = hSession->sessionId; in AttachChannel()
873 if ((ret = uv_tcp_open((uv_tcp_t *)&hChannel->hChildWorkTCP, hChannel->fdChildWorkTCP)) < 0) { in AttachChannel()
878 buf, hChannel->channelId, hChannel->fdChildWorkTCP); in AttachChannel()
879 Base::TryCloseHandle((uv_handle_t *)&hChannel->hChildWorkTCP); in AttachChannel()
880 --hChannel->ref; in AttachChannel()
883 Base::SetTcpOptions((uv_tcp_t *)&hChannel->hChildWorkTCP); in AttachChannel()
884 uv_read_start((uv_stream_t *)&hChannel->hChildWorkTCP, hSfc->AllocCallback, hSfc->ReadStream); in AttachChannel()
885 --hChannel->ref; in AttachChannel()
892 HChannel hChannel = hSfc->AdminChannel(OP_QUERY, channelId, nullptr); in DeatchChannel() local
893 if (!hChannel) { in DeatchChannel()
896 if (hChannel->childCleared) { in DeatchChannel()
903 Send(hSession->sessionId, hChannel->channelId, CMD_KERNEL_CHANNEL_CLOSE, &count, 1); in DeatchChannel()
904 if (uv_is_closing((const uv_handle_t *)&hChannel->hChildWorkTCP)) { in DeatchChannel()
905 …Base::DoNextLoop(&hSession->childLoop, hChannel, [](const uint8_t flag, string &msg, const void *d… in DeatchChannel()
906 HChannel hChannel = (HChannel)data; in DeatchChannel() local
907 hChannel->childCleared = true; in DeatchChannel()
908 WRITE_LOG(LOG_DEBUG, "Childchannel free direct, cid:%u", hChannel->channelId); in DeatchChannel()
911 … Base::TryCloseHandle((uv_handle_t *)&hChannel->hChildWorkTCP, [](uv_handle_t *handle) -> void { in DeatchChannel()
912 HChannel hChannel = (HChannel)handle->data; in DeatchChannel() local
913 hChannel->childCleared = true; in DeatchChannel()
914 WRITE_LOG(LOG_DEBUG, "Childchannel free callback, cid:%u", hChannel->channelId); in DeatchChannel()
923 HChannel hChannel = hSfc->AdminChannel(OP_QUERY, channelId, nullptr); in ServerCommand() local
925 if (!hChannel || !hSession) { in ServerCommand()