| /developtools/hdc/src/common/ |
| D | channel.cpp | 96 HChannel hChannel = (HChannel)v.second; in ClearChannels() local 97 if (!hChannel->isDead) { in ClearChannels() 98 FreeChannel(hChannel->channelId); in ClearChannels() 117 HChannel hChannel = (HChannel)tcp->data; in ReadStream() local 118 HdcChannelBase *thisClass = (HdcChannelBase *)hChannel->clsChannel; in ReadStream() 136 hChannel->availTailIndex += nread; in ReadStream() 138 while (hChannel->availTailIndex > DWORD_SERIALIZE_SIZE) { in ReadStream() 139 size = ntohl(*reinterpret_cast<uint32_t *>(hChannel->ioBuf + indexBuf)); // big endian in ReadStream() 144 if (hChannel->availTailIndex - DWORD_SERIALIZE_SIZE < size) { in ReadStream() 147 childRet = thisClass->ReadChannel(hChannel, reinterpret_cast<uint8_t *>(hChannel->ioBuf) + in ReadStream() [all …]
|
| D | channel.h | 44 virtual int ReadChannel(HChannel hChannel, uint8_t *bufPtr, const int bytesIO) in ReadChannel() argument 48 virtual void NotifyInstanceChannelFree(HChannel hChannel) {}; in NotifyInstanceChannelFree() argument 50 void SendChannel(HChannel hChannel, uint8_t *bufPtr, const int size); 51 …void SendChannelWithCmd(HChannel hChannel, const uint16_t commandFlag, uint8_t *bufPtr, const int … 52 void EchoToClient(HChannel hChannel, uint8_t *bufPtr, const int size); 74 void FreeChannelContinue(HChannel hChannel);
|
| /developtools/hdc/src/host/ |
| D | server_for_client.cpp | 51 HChannel hChannel = nullptr; in AcceptClient() local 52 uint32_t uid = thisClass->MallocChannel(&hChannel); in AcceptClient() 53 if (!hChannel) { in AcceptClient() 56 if (uv_accept(server, (uv_stream_t *)&hChannel->hWorkTCP) < 0) { in AcceptClient() 63 uv_recv_buffer_size((uv_handle_t *)&hChannel->hWorkTCP, &bufMaxSize); in AcceptClient() 75 uv_read_start((uv_stream_t *)&hChannel->hWorkTCP, funcChannelHeaderAlloc, ReadStream); in AcceptClient() 79 handShake.channelId = htonl(hChannel->channelId); in AcceptClient() 87 thisClass->Send(hChannel->channelId, (uint8_t *)&handShake, sizeof(struct ChannelHandShake)); in AcceptClient() 90 thisClass->Send(hChannel->channelId, reinterpret_cast<uint8_t *>(&handShake), in AcceptClient() 163 void HdcServerForClient::EchoClient(HChannel hChannel, MessageLevel level, const char *msg, ...) in EchoClient() argument [all …]
|
| D | server_for_client.h | 26 void EchoClient(HChannel hChannel, MessageLevel level, const char *msg, ...); 27 void EchoClientRaw(const HChannel hChannel, uint8_t *payload, const int payloadSize); 28 void SendCommandToClient(const HChannel hChannel, const uint16_t commandFlag, uint8_t *payload, 37 int ReadChannel(HChannel hChannel, uint8_t *bufPtr, const int bytesIO) override; 38 void ReportServerVersion(HChannel hChannel); 39 bool DoCommand(HChannel hChannel, void *formatCommandInput); 40 void OrderFindTargets(HChannel hChannel); 41 …bool NewConnectTry(void *ptrServer, HChannel hChannel, const string &connectKey, bool isCheck = fa… 43 …bool SendToDaemon(HChannel hChannel, const uint16_t commandFlag, uint8_t *bufPtr, const int bufSiz… 44 int BindChannelToSession(HChannel hChannel, uint8_t *bufPtr, const int bytesIO); [all …]
|
| D | client.cpp | 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() [all …]
|
| D | server.cpp | 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() [all …]
|
| D | client.h | 42 int ReadChannel(HChannel hChannel, uint8_t *buf, const int bytesIO) override; 43 int PreHandshake(HChannel hChannel, const uint8_t *buf); 48 void BindLocalStd(HChannel hChannel); 50 void NotifyInstanceChannelFree(HChannel hChannel) override; 52 HTaskInfo GetRemoteTaskInfo(HChannel hChannel);
|