- char textZ[ENC_MSG_LEN];
- if (text.size() - pos < ENC_MSG_LEN)
- memset(textZ, 0, ENC_MSG_LEN);
- strncpy(textZ, text.c_str() + pos, std::min(ENC_MSG_LEN, (int)(text.size() - pos)));
- char ct[ENC_MSG_LEN];
- EncodeString(ct, textZ, &ctx);
- if (send(outerSocket, ct, ENC_MSG_LEN, 0) <= 0)
- {
- errorMsg = SEND_DATA_ERROR;
- return st_send_fail;
- }
- pos += ENC_MSG_LEN;