Skip to content

Commit

Permalink
windows下开启O2优化
Browse files Browse the repository at this point in the history
  • Loading branch information
xiyoo0812 committed Sep 21, 2023
1 parent b7be678 commit 690cf41
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions script/network/net_client.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
--net_client.lua

local log_err = logger.err
local log_fatal = logger.fatal
local qeval = quanta.eval
local qxpcall = quanta.xpcall

Expand Down Expand Up @@ -112,17 +111,12 @@ function NetClient:close()
end
end

function NetClient:write(cmd, data, type, session_id, flag)
function NetClient:write(cmd_id, data, type, session_id, flag)
if not self.alive then
return false
end
local body, cmd_id, pflag = self:encode(cmd, data, flag)
if not body then
log_fatal("[NetClient][write] encode failed! data (%s-%s)", cmd_id, body)
return false
end
-- call lbus
local send_len = self.socket.call_pb(cmd_id, pflag, type, session_id, data)
local send_len = self.socket.call_pb(cmd_id, flag, type, session_id, data)
if send_len < 0 then
log_err("[NetClient][write] call_pb failed! code:%s", send_len)
return false
Expand Down

0 comments on commit 690cf41

Please sign in to comment.