Sign in to follow this  
Followers 0
Intosia

Gameserver query

1 post in this topic

Hi,

Im trying to make a simple game server query thing for myself... I dont get any data back. What is wrong? The server Ip and Port are correct.

The C string is '\xff\xff\xff\xffgetstatus'. What do i send? the chr(255), or ÿÿÿ version?

$str = Chr(255)&Chr(255)&Chr(255)&Chr(255)&"getstatus"
;$str = "ÿÿÿÿgetstatus"
ConsoleWrite($str)

TCPStartup ()

$socket = UDPOpen("208.122.34.16", 28960)
If @error <> 0 Then ConsoleWrite("Err")


    $status = UDPSend($socket, $str)
    ConsoleWrite($status)
    If $status = 0 then 
        MsgBox(0, "ERROR", "Error while sending UDP message: " & @error)
        Exit
    EndIf
    
While 1
    $data = UDPRecv($socket, 50)
    If $data <> "" Then
        ConsoleWrite($data)
    EndIf
    
WEnd

Share this post


Link to post
Share on other sites



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0