Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 00:30

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Checking server status in C#

Discussion on Checking server status in C# within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1


 
KraHen's Avatar
 
elite*gold: 0
Join Date: Jul 2006
Posts: 2,216
Received Thanks: 794
Checking server status in C#

Okay guys, I`m making a launcher. I already made the IP updater in it, but I wanna do a server status checker aswell. Since my ISP is upadting some cable **** I can`t load Google (epvp and YouTube are the only sites that i can load o.o), so I`m asking this here.

How can I make a checker similar to fsockopen in C#?
KraHen is offline  
Old 09/21/2008, 10:35   #2
 
andyd123's Avatar
 
elite*gold: 20
Join Date: Apr 2006
Posts: 1,341
Received Thanks: 886
From CoEmu's Launcher:
Code:
void UpdateStatus(IPAddress[] IP)
		{
			TcpClient GameServerCheck =  new TcpClient();
			int GamePort = 0; //The port of your game server
			try {
				GameServerCheck.Connect(IP[0], GamePort);
				
				this.Invoke((MethodInvoker) delegate
				{
				this.label3.Text = "Online";
				this.label3.ForeColor = Color.Green;
				});
			}
			catch {
				this.Invoke((MethodInvoker) delegate
				{
				this.label3.Text = "Offline";
				this.label3.ForeColor = Color.Red;
				});
			}
			TcpClient LoginServerCheck =  new TcpClient();
			int LoginPort = 0;//The port of your login server
			try {
				LoginServerCheck.Connect(IP[0], LoginPort);
				
				this.Invoke((MethodInvoker) delegate
				{
				this.label5.Text = "Online";
				this.label5.ForeColor = Color.Green;
				});
			}
			catch {
				this.Invoke((MethodInvoker) delegate
				{
				this.label5.Text = "Offline";
				this.label5.ForeColor = Color.Red;
				});
			}
		}
Basically, if it catches any error it assumes the server is offline.
andyd123 is offline  
Thanks
2 Users
Old 09/21/2008, 11:28   #3


 
KraHen's Avatar
 
elite*gold: 0
Join Date: Jul 2006
Posts: 2,216
Received Thanks: 794
Thanks^^

P.S. I need one more line though What should i add to the "using" list?
KraHen is offline  
Old 09/21/2008, 11:47   #4
 
andyd123's Avatar
 
elite*gold: 20
Join Date: Apr 2006
Posts: 1,341
Received Thanks: 886
Code:
using System.Net;
using System.Net.Sockets;
using System.IO;
should do it.
andyd123 is offline  
Old 09/21/2008, 12:55   #5
 
© Haydz's Avatar
 
elite*gold: 20
Join Date: Jan 2008
Posts: 1,042
Received Thanks: 252
ewww tcp
© Haydz is offline  
Reply


Similar Threads Similar Threads
Checking...
09/12/2010 - Shaiya Private Server - 12 Replies
Ok pplozorz i finally got the sv up ... the only problem is that my friends can't connect to the server only i can conncet. why fast respnd pls xD
checking
08/18/2010 - Archlord Trading - 1 Replies
hi all i only wanna check the offers for : zerk lv 7x armor of nuendo 8% sb greaves of nuendo 190 hp gauntlets and boots of kildemor noob extra stats^^ helmet of mongola helmet elite + 27 with wisdom to exp easy with mana helmet lv35 +17 with stam lv3 for chaotic helmet lv 60 + 24/ 8%all ele resi stam lv3
Just checking.
06/16/2010 - 9Dragons Trading - 2 Replies
Alright so I didn't see anything that said I couldn't "check" for offers. If I was to trade my Cs HD warrior on Asura would anyone be willing to trade a 8 B for it? -Once its restored..I'll probably leave SOME(400 def set,dodge wbs and shoes,some of the BK relics) items on it- Get back to me.
[Server Status] Server Status Programs From A Couple Servers.
11/05/2008 - Conquer Online 2 - 9 Replies
Hey i dont know in what section to post it so i hope that the mods will move it to the good section but i made this server status program i will make later more server status programs for other servers. PhoenixCo: Server Checker Qonquer Qonquer Server Checker Screenshot: http://i286.photobucket.com/albums/ll115/aschwinh /sdfsdfsdf.jpg



All times are GMT +1. The time now is 00:31.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.