nrk / redis-lua

A Lua client library for the redis key value storage system.
MIT License
731 stars 239 forks source link

request.multibulk #73

Open xiecheng1991 opened 3 years ago

xiecheng1991 commented 3 years ago
buffer[1] = '*' .. tostring(argsn + 1) .. "\r\n"
buffer[2] = '$' .. #command .. "\r\n" .. command .. "\r\n"

local table_insert = table.insert
for i = 1, argsn do
    local s_argument = tostring(args[i] or '')
    table_insert(buffer, '$' .. #s_argument .. "\r\n" .. s_argument .. "\r\n")
end

i got confused with that we have to communicate with redis in this format? please help me to understand why thanks!