------------------------------------------------- -- 本文件由代码生成器自动生成, -- 千万不要修改本文件的任何代码, -- 修改的的任何代码都会被覆盖掉! ---------------------------------------------------- local Socket = require "Xmds.Pomelo.LuaGameSocket" require "base64" require "fishBossHandler_pb" --------------------------------Pomelo------------------------------- Pomelo = Pomelo or {} --------------------------------FishBossHandler------------------------------- Pomelo.FishBossHandler = {} local function fishBossInfoRequestEncoder(msg) local input = fishBossHandler_pb.FishBossInfoRequest() protobuf.FromMessage(input,msg) return (input:SerializeToString()) end local function fishBossInfoRequestDecoder(stream) local res = fishBossHandler_pb.FishBossInfoResponse() res:ParseFromString(stream) return res end function Pomelo.FishBossHandler.fishBossInfoRequest(cb,option) local input = nil Socket.OnRequestStart("fishboss.fishBossHandler.fishBossInfoRequest", option) Socket.Request("fishboss.fishBossHandler.fishBossInfoRequest", input, function(res) if(res.s2c_code == 200) then Pomelo.FishBossHandler.lastFishBossInfoResponse = res Socket.OnRequestEnd("fishboss.fishBossHandler.fishBossInfoRequest", true) cb(nil,res) else local ex = {} if(res.s2c_code) then ex.Code = res.s2c_code ex.Message = res.s2c_msg else ex.Code = 501 ex.Message = "[LuaXmdsNetClient] fishboss.fishBossHandler.fishBossInfoRequest decode error!!" end Socket.OnRequestEnd("fishboss.fishBossHandler.fishBossInfoRequest", false,ex.Code,ex.Message) cb(ex,nil) end end, fishBossInfoRequestEncoder, fishBossInfoRequestDecoder) end --------------------------------Pomelo------------------------------- return Pomelo