[Release] Simple MySql Pool handler

07/15/2011 18:31 marlyandedsel#31
thanks fang .... it is very useful I will do it in your way.....

Quote:
#region Kill Sleeping Connection
private void Loop()
{
int count = 0;
while (1 > 0)
{
Sleep(2000);
count++;
if (count > 29)
{
Conquer_Online_Server.Database.KillConnections.Kil l();
count = 0;
}
Sleep(Milliseconds);
}
}
#endregion
Fang I have come up with that code, is that correct? and put it in the thread system
07/16/2011 21:05 Spirited#32
try something like this...
Code:
while (true)
{
     Database.KillConnections.Kill();
     Thread.Sleep(30000); // Sleep for 30 seconds 
}
Make sure that it's on its own thread though. Do NOT put it on the main thread or it'll lag your server.
07/17/2011 00:53 marlyandedsel#33
thanks fang..... thanks very much
07/17/2011 22:31 alanpk2009#34
Fang please give you yahoo or mensseger my is [Only registered and activated users can see links. Click Here To Register...]
07/18/2011 00:35 Spirited#35
Quote:
Originally Posted by alanpk2009 View Post
Fang please give you yahoo or mensseger my is [Only registered and activated users can see links. Click Here To Register...]
It's not public for a reason.
I'm not going to guide you on how to do this for your source. You need to think it through and implement it using the C# you know.
07/18/2011 02:42 marlyandedsel#36
Fang I did something like this

1.I have put public static for ServerManagement as a new thread that run every 30 sec
I put in the program class

2.I called the ServerManagement as a New Action and I called it like ServerManagement.start();

3. I create a static void for ServerManagement_Execute()
inside it i call the Database.KillConnection.Kill();

its very useful, it slow the memory usage of the server every time the server call that, and its working fine... thanks fang.......
07/18/2011 02:48 alanpk2009#37
please need help
07/18/2011 03:47 marlyandedsel#38
like fang he said, you have to think of it and learn how to do it okay ? thats what I do lol......
07/18/2011 06:15 alanpk2009#39
just want to ask you a question
07/26/2011 20:21 zzaki201065#40
where can i add them plz Help me