/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() 119 uint32_t channelId = hChannel->channelId; in ReadStream() 137 hChannel->availTailIndex += nread; in ReadStream() 139 while (hChannel->availTailIndex > DWORD_SERIALIZE_SIZE) { in ReadStream() 140 size = ntohl(*reinterpret_cast<uint32_t *>(hChannel->ioBuf + indexBuf)); // big endian in ReadStream() 146 if (hChannel->availTailIndex - DWORD_SERIALIZE_SIZE < size) { 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() 57 int rc = uv_accept(server, (uv_stream_t *)&hChannel->hWorkTCP); in AcceptClient() 66 uv_recv_buffer_size((uv_handle_t *)&hChannel->hWorkTCP, &bufMaxSize); in AcceptClient() 78 uv_read_start((uv_stream_t *)&hChannel->hWorkTCP, funcChannelHeaderAlloc, ReadStream); in AcceptClient() 82 handShake.channelId = htonl(hChannel->channelId); in AcceptClient() 90 thisClass->Send(hChannel->channelId, (uint8_t *)&handShake, sizeof(struct ChannelHandShake)); in AcceptClient() 93 thisClass->Send(hChannel->channelId, reinterpret_cast<uint8_t *>(&handShake), in AcceptClient() 166 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() 442 HChannel hChannel = (HChannel)stream->data; in ReadStd() local 443 HdcClient *thisClass = (HdcClient *)hChannel->clsChannel; in ReadStd() 444 char *cmd = hChannel->bufStd; in ReadStd() 449 thisClass->Send(hChannel->channelId, reinterpret_cast<uint8_t *>(cmd), strlen(cmd)); in ReadStd() 450 Base::ZeroArray(hChannel->bufStd); in ReadStd() 478 void HdcClient::BindLocalStd(HChannel hChannel) in BindLocalStd() argument 489 if (uv_tty_init(loopMain, &hChannel->stdoutTty, STDOUT_FILENO, 0) in BindLocalStd() 490 || uv_tty_init(loopMain, &hChannel->stdinTty, STDIN_FILENO, 1)) { in BindLocalStd() [all …]
|
D | server.cpp | 538 HChannel hChannel = sfc->AdminChannel(OP_QUERY_REF, channelId, nullptr); in FetchCommand() local 539 if (!hChannel) { in FetchCommand() 552 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() 608 sfc->SendCommandToClient(hChannel, command, payload, payloadSize); in FetchCommand() 612 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);
|