• Home
  • Raw
  • Download

Lines Matching refs:hChannel

49 void HdcClient::NotifyInstanceChannelFree(HChannel hChannel)  in NotifyInstanceChannelFree()  argument
53 ModifyTty(false, &hChannel->stdinTty); in NotifyInstanceChannelFree()
439 HChannel hChannel = (HChannel)stream->data; in ReadStd() local
440 HdcClient *thisClass = (HdcClient *)hChannel->clsChannel; in ReadStd()
441 char *cmd = hChannel->bufStd; in ReadStd()
445 thisClass->Send(hChannel->channelId, reinterpret_cast<uint8_t *>(cmd), strlen(cmd)); in ReadStd()
446 Base::ZeroArray(hChannel->bufStd); in ReadStd()
474 void HdcClient::BindLocalStd(HChannel hChannel) in BindLocalStd() argument
485 if (uv_tty_init(loopMain, &hChannel->stdoutTty, STDOUT_FILENO, 0) in BindLocalStd()
486 || uv_tty_init(loopMain, &hChannel->stdinTty, STDIN_FILENO, 1)) { in BindLocalStd()
490 hChannel->stdoutTty.data = hChannel; in BindLocalStd()
491 ++hChannel->uvHandleRef; in BindLocalStd()
492 hChannel->stdinTty.data = hChannel; in BindLocalStd()
493 ++hChannel->uvHandleRef; in BindLocalStd()
496 ModifyTty(true, &hChannel->stdinTty); in BindLocalStd()
497 uv_read_start((uv_stream_t *)&hChannel->stdinTty, AllocStdbuf, ReadStd); in BindLocalStd()
505 HChannel hChannel = reinterpret_cast<HChannel>(thisClass->channel); in Connect() local
506 if (status < 0 || uv_is_closing((const uv_handle_t *)&hChannel->hWorkTCP)) { in Connect()
508 thisClass->FreeChannel(hChannel->channelId); in Connect()
511 thisClass->BindLocalStd(hChannel); in Connect()
512 Base::SetTcpOptions((uv_tcp_t *)&hChannel->hWorkTCP); in Connect()
513 uv_read_start((uv_stream_t *)&hChannel->hWorkTCP, AllocCallback, ReadStream); in Connect()
516 int HdcClient::PreHandshake(HChannel hChannel, const uint8_t *buf) in PreHandshake() argument
520 hChannel->availTailIndex = 0; in PreHandshake()
525 uint32_t unOld = hChannel->channelId; in PreHandshake()
526 hChannel->channelId = ntohl(hShake->channelId); in PreHandshake()
527 AdminChannel(OP_UPDATE, unOld, hChannel); in PreHandshake()
533 hChannel->availTailIndex = 0; in PreHandshake()
547 hChannel->availTailIndex = 0; in PreHandshake()
551 Send(hChannel->channelId, reinterpret_cast<uint8_t *>(hShake), sizeof(ChannelHandShake)); in PreHandshake()
554 …Send(hChannel->channelId, reinterpret_cast<uint8_t *>(hShake), offsetof(struct ChannelHandShake, v… in PreHandshake()
556 hChannel->handshakeOK = true; in PreHandshake()
559 Send(hChannel->channelId, in PreHandshake()
567 int HdcClient::ReadChannel(HChannel hChannel, uint8_t *buf, const int bytesIO) in ReadChannel() argument
569 if (!hChannel->handshakeOK) { in ReadChannel()
570 return PreHandshake(hChannel, buf); in ReadChannel()
591 if (hChannel->remote > RemoteType::REMOTE_NONE && bOffset) { in ReadChannel()
593 if (hChannel->remote == RemoteType::REMOTE_FILE) { in ReadChannel()
595 HTaskInfo hTaskInfo = GetRemoteTaskInfo(hChannel); in ReadChannel()
604 if (hChannel->remote == RemoteType::REMOTE_APP) { in ReadChannel()
606 HTaskInfo hTaskInfo = GetRemoteTaskInfo(hChannel); in ReadChannel()
704 HTaskInfo HdcClient::GetRemoteTaskInfo(HChannel hChannel) in GetRemoteTaskInfo() argument
707 hTaskInfo->channelId = hChannel->channelId; in GetRemoteTaskInfo()