public class MsgPackInRedis {
private String ip;
private int port;
private String session;
private String protocol;
}
MsgPackInRedis msgPackStringInRedis = new MsgPackInRedis();
I encode a java object msgPackStringInRedis of class MsgPackInRedis with msgpack, then store in redis. And I want to decode that in lua, which runs in redis, how can I get "session" ? Can I do like this below, get session by index 3?
local msgPackObject = cmsgpack.unpack(msgPackStringInRedis)
local session = msgPackObject[3]