Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: Simple UDP example anyone?

by Anonymous Monk
on Feb 14, 2008 at 17:32 UTC ( #667977=note: print w/ replies, xml ) Need Help??


in reply to Re: Simple UDP example anyone?
in thread Simple UDP example anyone?

Hi! I've been looking for UDP exampels as well, and i finally found it here! Thanks! But i'm having some problems with your send/receive script:( In my case i'm trying to query a game server (TF2). It runs on port 27015, so i changed PeerPort to 27015 and PeerAddr to my server ip. To get A2S_INFO (number of players, map, server name etc) i have to send a request UDP packet with the following info: "FF FF FF FF 54 53 6F 75 72 63 65 20 45 6E 67 69 6E 65 20 51 75 65 72 79 00 Source Engine Query". When the server gets this packet is should respond by sending this server info back. However, when i run the script nothing happens. It doesn't print anything:( I'm not sure about the LocalPort.. Nevertheless, i've been stuck with this for a long time now, and no one can help me out. Therefore i seek the wisdom of the monks. Thanks in advance! Url to the query protocol for those who are interested: http://developer.valvesoftware.com/wiki/Server_Queries


Comment on Re^2: Simple UDP example anyone?
Re^3: Simple UDP example anyone?
by Anonymous Monk on Feb 14, 2008 at 17:37 UTC
    Hmm, strange. I only posted once :(
Re^3: Simple UDP example anyone?
by ctilmes (Priest) on Feb 15, 2008 at 16:38 UTC
    Are you sending that as a string, or are you 'pack'ing the bytes? Post your code for constructing the packet.
      Hi! First i sent it as string (my bad), but know i send it as bytes (the right way).
      $sock->send("\xFF\xFF\xFF\xFFTSource Engine Query\x00");
      But still no answer :/ Been stuck with this like 3 days now:(
        Errr i mean "now", just had to make things right. I hate typos :p

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://667977]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2014-08-22 00:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (144 votes), past polls