Exemplo n.º 1
0
    static int IsConnected(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 1);
        NetworkConn obj = (NetworkConn)LuaScriptMgr.GetNetObjectSelf(L, 1, "NetworkConn");
        bool        o   = obj.IsConnected();

        LuaScriptMgr.Push(L, o);
        return(1);
    }
Exemplo n.º 2
0
    public static void SendTimeTracer(uint msgId, double dCurTime, NetworkConn server)
    {
        if (server == null || !server.IsConnected())
        {
            return;
        }

        TimeTracer tracer = new TimeTracer();

        tracer.sendTimeStamp = dCurTime;
        tracer.id            = msgId;
        server.SendPack <TimeTracer>(0, tracer, MsgID.TimeTracerID);
    }