?
Solved

Getting Server Information

Posted on 2003-03-13
14
Medium Priority
?
198 Views
Last Modified: 2010-03-19
Hey i want to know the commands or a tutorial that will help me figure out how to send udp or tcp/ip requests to half-life servers to request server information from. sorry i cant offer any more points im broke point wise and money is not something i like to spend
0
Comment
Question by:Rinale
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
14 Comments
 
LVL 7

Expert Comment

by:dansoto
ID: 8133505
what kind of information do you want from the servers?
0
 

Author Comment

by:Rinale
ID: 8133838
I downlaoded the half-life sdk and got the protocal file but im kinda clueless on winsock because ive never used it before but this is what i *think is the information i need to learn how to use.

==============
INFO
==============

game servers will answer the following messages:
Messages are sent to the server by sending 4 consecutive bytes of 255 (32-bit integer -1) and then the string command followed by a zero byte to terminate it

"ping"
     Server responds with the following packet:
     (int32)          -1
     (byte)          ASCII 'j' (general acknowledgement, A2A_ACK)
     (byte)          0

"info"
     Server responds with the following packet:
     (int32)          -1
     (byte)          ASCII 'C' (info response, S2A_INFO)
     (string)          net address of server
     (string)          name of the host / server
     (string)          name of the map
     (string)          game directory (i.e. valve/)
     (string)          Game description (e.g. "half-life multiplay")
     (byte)          active client count
     (byte)          maximum clients allowed
     (byte)          protocol version

"players"
     Server responds with the following packet:
     (int32)          -1
     (byte)          ASCII 'D' (players response, S2A_PLAYER)
     (byte)          active client count

     for each active client
          (byte)          client number / index
          (string)          player name
          (int32)          client's frag total
          (float32)          client's total time in-game

"rules"
     Server responds with the following packet:
     (int32)          -1
     (byte)          ASCII 'E' (rules response, S2A_RULES)
     (int16)          number of rules

     for each rule
          (string)          rule name
          (string)          rule value

0
 

Author Comment

by:Rinale
ID: 8133921
I downlaoded the half-life sdk and got the protocal file but im kinda clueless on winsock because ive never used it before but this is what i *think is the information i need to learn how to use.

==============
INFO
==============

game servers will answer the following messages:
Messages are sent to the server by sending 4 consecutive bytes of 255 (32-bit integer -1) and then the string command followed by a zero byte to terminate it

"ping"
     Server responds with the following packet:
     (int32)          -1
     (byte)          ASCII 'j' (general acknowledgement, A2A_ACK)
     (byte)          0

"info"
     Server responds with the following packet:
     (int32)          -1
     (byte)          ASCII 'C' (info response, S2A_INFO)
     (string)          net address of server
     (string)          name of the host / server
     (string)          name of the map
     (string)          game directory (i.e. valve/)
     (string)          Game description (e.g. "half-life multiplay")
     (byte)          active client count
     (byte)          maximum clients allowed
     (byte)          protocol version

"players"
     Server responds with the following packet:
     (int32)          -1
     (byte)          ASCII 'D' (players response, S2A_PLAYER)
     (byte)          active client count

     for each active client
          (byte)          client number / index
          (string)          player name
          (int32)          client's frag total
          (float32)          client's total time in-game

"rules"
     Server responds with the following packet:
     (int32)          -1
     (byte)          ASCII 'E' (rules response, S2A_RULES)
     (int16)          number of rules

     for each rule
          (string)          rule name
          (string)          rule value

0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Rinale
ID: 8133947
I downlaoded the half-life sdk and got the protocal file but im kinda clueless on winsock because ive never used it before but this is what i *think is the information i need to learn how to use.

==============
INFO
==============

game servers will answer the following messages:
Messages are sent to the server by sending 4 consecutive bytes of 255 (32-bit integer -1) and then the string command followed by a zero byte to terminate it

"ping"
     Server responds with the following packet:
     (int32)          -1
     (byte)          ASCII 'j' (general acknowledgement, A2A_ACK)
     (byte)          0

"info"
     Server responds with the following packet:
     (int32)          -1
     (byte)          ASCII 'C' (info response, S2A_INFO)
     (string)          net address of server
     (string)          name of the host / server
     (string)          name of the map
     (string)          game directory (i.e. valve/)
     (string)          Game description (e.g. "half-life multiplay")
     (byte)          active client count
     (byte)          maximum clients allowed
     (byte)          protocol version

"players"
     Server responds with the following packet:
     (int32)          -1
     (byte)          ASCII 'D' (players response, S2A_PLAYER)
     (byte)          active client count

     for each active client
          (byte)          client number / index
          (string)          player name
          (int32)          client's frag total
          (float32)          client's total time in-game

"rules"
     Server responds with the following packet:
     (int32)          -1
     (byte)          ASCII 'E' (rules response, S2A_RULES)
     (int16)          number of rules

     for each rule
          (string)          rule name
          (string)          rule value

0
 

Author Comment

by:Rinale
ID: 8133996
I downlaoded the half-life sdk and got the protocal file but im kinda clueless on winsock because ive never used it before but this is what i *think is the information i need to learn how to use.

==============
INFO
==============

game servers will answer the following messages:
Messages are sent to the server by sending 4 consecutive bytes of 255 (32-bit integer -1) and then the string command followed by a zero byte to terminate it

"ping"
     Server responds with the following packet:
     (int32)          -1
     (byte)          ASCII 'j' (general acknowledgement, A2A_ACK)
     (byte)          0

"info"
     Server responds with the following packet:
     (int32)          -1
     (byte)          ASCII 'C' (info response, S2A_INFO)
     (string)          net address of server
     (string)          name of the host / server
     (string)          name of the map
     (string)          game directory (i.e. valve/)
     (string)          Game description (e.g. "half-life multiplay")
     (byte)          active client count
     (byte)          maximum clients allowed
     (byte)          protocol version

"players"
     Server responds with the following packet:
     (int32)          -1
     (byte)          ASCII 'D' (players response, S2A_PLAYER)
     (byte)          active client count

     for each active client
          (byte)          client number / index
          (string)          player name
          (int32)          client's frag total
          (float32)          client's total time in-game

"rules"
     Server responds with the following packet:
     (int32)          -1
     (byte)          ASCII 'E' (rules response, S2A_RULES)
     (int16)          number of rules

     for each rule
          (string)          rule name
          (string)          rule value

0
 
LVL 15

Expert Comment

by:WalkaboutTigger
ID: 8134482
Don't hit refresh on these pages.

The SDK has some sample code with it.  Have you looked at the samples yet?  What is it you're trying to do?

Walkabout
0
 

Author Comment

by:Rinale
ID: 8137715
That was everything that came with the file protocol thing so i didnt have any examples except for that to look off of thats why i came here to ask the question.
0
 
LVL 7

Expert Comment

by:dansoto
ID: 8137824
Here is a link that should explain everything you need to know about using these commands in the console...and then some.

http://half-life.gamehelp.com/console/index.html

Let me know if this helps..

- dan soto -
0
 

Author Comment

by:Rinale
ID: 8137912
oh yeah what im trying to do is ping the server for its information
0
 

Author Comment

by:Rinale
ID: 8137988
 I already know the commands for console (and then some) im trying to do this completely outside of hl.exe (dos or vb) vb using winsock or dos using ping or connect or whatever you need to use.
0
 
LVL 7

Expert Comment

by:dansoto
ID: 8138004
ahh.. sorry...
0
 

Author Comment

by:Rinale
ID: 8140068
np
0
 

Author Comment

by:Rinale
ID: 8144170
hey could you guys please delete this question i solved it and there is no point for it to still be around
0
 

Accepted Solution

by:
SpideyMod earned 0 total points
ID: 8147663
PAQ'd and all 50 points refunded.

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to security, there are always trade-offs between security and convenience/ease of administration. This article examines some of the main pros and cons of using key authentication vs password authentication for hosting an SFTP server.
This month, Experts Exchange’s free Course of the Month is focused on CompTIA IT Fundamentals.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question