Lines Matching refs:sendBuf
273 char* sendBuf = msgBuf.get(); in ClientSendReq() local
275 sendBuf[0] = 0x81; // 0x81: the text message sent by the server should start with '0x81'. in ClientSendReq()
280 sendBuf[1] = msgLen | (mask << 7); // 7: mask need shift left by 7 bits in ClientSendReq()
283 …sendBuf[1] = 126 | (mask << 7); // 126: payloadLen according to the spec; 7: mask shift left … in ClientSendReq()
284 sendBuf[2] = ((msgLen >> 8) & 0xff); // 8: shift right by 8 bits => res * (256^1) in ClientSendReq()
285 sendBuf[3] = (msgLen & 0xff); // 3: store len's data => res * (256^0) in ClientSendReq()
288 …sendBuf[1] = 127 | (mask << 7); // 127: payloadLen according to the spec; 7: mask shift left by… in ClientSendReq()
290 sendBuf[i] = 0; in ClientSendReq()
292 sendBuf[6] = ((msgLen & 0xff000000) >> 24); // 6: shift 24 bits => res * (256^3) in ClientSendReq()
293 sendBuf[7] = ((msgLen & 0x00ff0000) >> 16); // 7: shift 16 bits => res * (256^2) in ClientSendReq()
294 sendBuf[8] = ((msgLen & 0x0000ff00) >> 8); // 8: shift 8 bits => res * (256^1) in ClientSendReq()
295 sendBuf[9] = (msgLen & 0x000000ff); // 9: res * (256^0) in ClientSendReq()
299 if (memcpy_s(sendBuf + sendMsgLen, SOCKET_MASK_LEN, MASK_KEY, SOCKET_MASK_LEN) != EOK) { in ClientSendReq()
310 if (memcpy_s(sendBuf + sendMsgLen, msgLen, maskMessage.c_str(), msgLen) != EOK) { in ClientSendReq()
316 if (send(client_, sendBuf, sendMsgLen + msgLen, 0) != static_cast<int>(sendMsgLen + msgLen)) { in ClientSendReq()