KillConnection

03/26/2012 21:50 bryce16#1
So Iv'e recently been having some 'fun' with the KillConnection file Fang provided me with on another thread which I find very useful as it helps keep issues with users connections away from the project.
I do have two question's i'd like to be answered as soon as possible as I would like to know what exactly do these codes mean and do. I know what the KillConnection implementation does and how it effects the overall project. I found these following codes laying around on a source I can't seem to remember but I would like to know how they work.

Code:
if (Now.Second >= 0)
            {
                MySql.Data.MySqlClient.MySqlConnection conn = DataHolder.MySqlConnection;
                // conn.Open();
                conn.Dispose();
                //conn.Open();
                KillConnections.Kill();
                GameServer.Enable();
                AuthServer.Enable();
            }
Code:
if (Now >= KillProcesss)
            {
                KillConnections.Kill();
                KillProcesss = DateTime.Now.AddSeconds(30);
                //Console.WriteLine("");

            }
Code:
public static DateTime KillProcesss = DateTime.Now.AddSeconds(30);