RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Server Status By Packets

cothumun

Sorceror
Hi everyone! I m creating simple c# application for server status. How can i get server status (online players,etc...) by tcp packets ? Thanx.
 

cothumun

Sorceror
I wrote this but i cant get any data about status.

IPEndPoint ip=new IPEndPoint(IPAddress.Parse("XXXXXXXXXXXXXX"), 2593);
Socket server=new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
try {
server.Connect(ip);
} catch {
Console.WriteLine("Unable to connect to server.");
return;
}
String send="?ÿ";
byte[] sendBuffer=Encoding.ASCII.GetBytes(send);
server.Send(sendBuffer);

byte[] reciveBuffer=new byte[1024];
int serverStatus=server.Receive(reciveBuffer);
string test=Encoding.ASCII.GetString(reciveBuffer);
MessageBox.Show(test);
server.Close();
 
Top