Inheritance: CountedInstance
Example #1
0
        // ConnectionAuth.Approve()
        public static void On_ClientAuth(ConnectionAuth ca, Connection connection)
        {
            var ae = new Events.AuthEvent(connection);

            OnNext("On_ClientAuth", ae);

            ConnectionAuth.m_AuthConnection.Remove(connection);
            if (!ae.Approved)
            {
                ConnectionAuth.Reject(connection, ae.Reason);
                return;
            }
            SingletonComponent <ServerMgr> .Instance.ConnectionApproved(connection);
        }
Example #2
0
        // ConnectionAuth.Approve()
        public static void ClientAuth(ConnectionAuth ca, Connection connection)
        {
            var ae = new Events.AuthEvent(connection);

            OnClientAuth.OnNext(ae);

            ca.m_AuthConnection.Remove(connection);
            if (!ae.approved)
            {
                ConnectionAuth.Reject(connection, ae._reason);
            }

            Approval instance = new Approval();

            instance.level     = Application.loadedLevelName;
            instance.levelSeed = TerrainGenerator.Seed;
            instance.hostname  = server.hostname;
            Net.sv.Approve(connection, Approval.SerializeToBytes(instance));
        }
Example #3
0
        // ConnectionAuth.Approve()
        public static void ClientAuth(ConnectionAuth ca, Connection connection)
        {
            var ae = new Events.AuthEvent(connection);

            OnClientAuth.OnNext(ae);

            ca.m_AuthConnection.Remove(connection);
            if (!ae.approved) {
                ConnectionAuth.Reject(connection, ae._reason);
                return;
            }
            SingletonComponent<ServerMgr>.Instance.ConnectionApproved(connection);
        }