Hi all!

    My first mail. I hope you can unstuck me in my project and understand my incredible english learned in Spain.

    Im coding a little app (C#) just for our clan members to ping our hlds server and check if its running.

    Well, I have a php script in a web page to show actual server status. Looking the code I found what command is used and how is sended to server, via UDP packet.

    Im trying to do the same stuff in C#, but no way. A piece of code:

    string cmdHL = "ÿÿÿÿstatus\x00";   // same as php (works well there...)

    int puertoHL = 27015;

    IPAddress ip = IPAddress.Parse("xx.xx.xx.xx");

    UdpClient udppak = new UdpClient("xx.xx.xx.xx",puertoHL);

    byte[] cmd = Encoding.ASCII.GetBytes(cmdHL);

    int sended =
udppak.Send(cmd,cmd.Length);

    IPEndPoint conex = new IPEndPoint(ip,puertoHL);

    byte[] received =
udppak.Receive(ref conex);

   
    Thats all. App gets blocked in Receive instruction waiting for some packet that never arrives (I guess...).

    Any ideas? wrong command encoding?

    Thx in advance!




_______________________________________________ hlds_apps mailing list [EMAIL PROTECTED] http://list.valvesoftware.com/mailman/listinfo/hlds_apps

Reply via email to