local C2S = {}

local function SendData(data)
    local jsonConvert = require("Base/json.lua")
    local message = jsonConvert:encode(data)

    --print("-----------> message : " , message) 
    CS.ProjectNine.STCPConnecter.SendMessage(message)
end

function C2S:RemoteCall(funcName, ...)
    local data = {
        ["fnProcessor"] = funcName,
        ["tParam"] = { ... },
    }
    SendData(data)
end

function C2S:Login(account, password)
    local data = {
        ["fnProcessor"] = "Login",
        ["tParam"] = {account, password},
    }
    SendData(data)
end

return C2S