pthread_mutex_t sendLock;
stream_protocol::socket mTAConnectionSocket;
boost::array<char, 1024> readData;
- vector<char> commandData;
SIM_COMMAND command;
states currentState;
int32_t setSocketOpt(struct timeval timeout);
} //case
case DATA_READ: {
- // At this pouint32_t data is completely read
- // clear the vector for the first time and copy server data received
- commandData.clear();
- for (uint32_t i = 0; i < readData.size(); i++) {
- commandData.push_back(readData.at(i));
- }
- string tempData(commandData.begin(), commandData.end());
-
// Get the Session object
ResCommandBasePtr ptr = ResMakeCommand::getCommand(command,
- (void*)tempData.c_str(), &mSessionMap);
+ (void*) readData.data(), &mSessionMap);
if (!ptr == false) {
// Call the Session object to handle commands