Lines Matching refs:msgLen
346 int msgLen = strlen(CLIENT_WEBSOCKET_UPGRADE_REQ); in ClientSendWSUpgradeReq() local
347 int32_t sendLen = send(client_, CLIENT_WEBSOCKET_UPGRADE_REQ, msgLen, 0); in ClientSendWSUpgradeReq()
348 if (sendLen != msgLen) { in ClientSendWSUpgradeReq()
393 uint32_t msgLen = message.length(); in ClientSendReq() local
394 …std::unique_ptr<char[]> msgBuf = std::make_unique<char[]>(msgLen + 15); // 15: the maximum expand … in ClientSendReq()
401 if (msgLen <= 125) { // 125: situation 1 when message's length <= 125 in ClientSendReq()
402 sendBuf[1] = msgLen | (mask << 7); // 7: mask need shift left by 7 bits in ClientSendReq()
404 } else if (msgLen < 65536) { // 65536: message's length in ClientSendReq()
406 sendBuf[2] = ((msgLen >> 8) & 0xff); // 8: shift right by 8 bits => res * (256^1) in ClientSendReq()
407 sendBuf[3] = (msgLen & 0xff); // 3: store len's data => res * (256^0) in ClientSendReq()
414 sendBuf[6] = ((msgLen & 0xff000000) >> 24); // 6: shift 24 bits => res * (256^3) in ClientSendReq()
415 sendBuf[7] = ((msgLen & 0x00ff0000) >> 16); // 7: shift 16 bits => res * (256^2) in ClientSendReq()
416 sendBuf[8] = ((msgLen & 0x0000ff00) >> 8); // 8: shift 8 bits => res * (256^1) in ClientSendReq()
417 sendBuf[9] = (msgLen & 0x000000ff); // 9: res * (256^0) in ClientSendReq()
428 for (uint64_t i = 0; i < msgLen; i++) { in ClientSendReq()
432 if (memcpy_s(sendBuf + sendMsgLen, msgLen, maskMessage.c_str(), msgLen) != EOK) { in ClientSendReq()
437 msgBuf[sendMsgLen + msgLen] = '\0'; in ClientSendReq()
439 if (send(client_, sendBuf, sendMsgLen + msgLen, 0) != static_cast<int>(sendMsgLen + msgLen)) { in ClientSendReq()
524 uint16_t msgLen = 0; in HandleFrame() local
525 if (memcpy_s(&msgLen, sizeof(recvbuf), recvbuf, sizeof(recvbuf) - 1) != EOK) { in HandleFrame()
528 wsFrame.payloadLen = ntohs(msgLen); in HandleFrame()