Exemplo n.º 1
0
            /// <summary>
            /// Populates Rules for this server
            /// </summary>
            public void FetchRules()
            {
                if (RulesRequest != null)
                {
                    return;
                }

                Rules        = null;
                RulesRequest = new SourceServerQuery(this, Address, QueryPort);
            }
Exemplo n.º 2
0
            internal void OnServerRulesReceiveFinished(Dictionary <string, string> rules, bool Success)
            {
                RulesRequest = null;

                if (Success)
                {
                    Rules = rules;
                }

                if (OnReceivedRules != null)
                {
                    OnReceivedRules(Success);
                }
            }
Exemplo n.º 3
0
        public void UpdateRules()
        {
            //
            //
            // TEMPORARY, WE NEED TO WRITE OUR OWN VERSION OF THIS, DOESN'T WORK ON SPLIT PACKETS ETC
            //
            //

            using (var q = new SourceServerQuery(AddressString, ConnectionPort))
            {
                Rules = q.GetRules();
            }

            if (OnServerRules != null && Rules != null)
            {
                OnServerRules();
            }
        }