std::vector<char> RedisClientImpl::makeCommand(const std::vector<RedisBuffer> &items)
{
static const char crlf[] = {'\r', '\n'};
std::vector<char> result;
append(result, '*');
append(result, boost::lexical_cast<std::string>(items.size()));
append<>(result, crlf);
std::vector<RedisBuffer>::const_iterator it = items.begin(), end = items.end();
for(; it != end; ++it)
{
append(result, '$');
append(result, boost::lexical_cast<std::string>(it->size()));
append<>(result, crlf);
append(result, *it);
append<>(result, crlf);
}
return result;
}
이쁘다이쁘다
헤헤
예쁘네여 - DCW
http://lgstar.tk
커뮤니티 사이트 입니다 많은 이용 부탁 드립니다. - DCW