Lines Matching refs:sendBuf
395 char* sendBuf = msgBuf.get(); in ClientSendReq() local
397 sendBuf[0] = 0x81; // 0x81: the text message sent by the server should start with '0x81'. in ClientSendReq()
402 sendBuf[1] = msgLen | (mask << 7); // 7: mask need shift left by 7 bits in ClientSendReq()
405 …sendBuf[1] = 126 | (mask << 7); // 126: payloadLen according to the spec; 7: mask shift left … 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()
410 …sendBuf[1] = 127 | (mask << 7); // 127: payloadLen according to the spec; 7: mask shift left by… in ClientSendReq()
412 sendBuf[i] = 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()
421 if (memcpy_s(sendBuf + sendMsgLen, SOCKET_MASK_LEN, MASK_KEY, SOCKET_MASK_LEN) != EOK) { in ClientSendReq()
432 if (memcpy_s(sendBuf + sendMsgLen, msgLen, maskMessage.c_str(), msgLen) != EOK) { in ClientSendReq()
439 if (send(client_, sendBuf, sendMsgLen + msgLen, 0) != static_cast<int>(sendMsgLen + msgLen)) { in ClientSendReq()