Hello Simon

----- Original Message -----
From: "Simon Rose" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, February 22, 2002 11:55 PM
Subject: RE: [hlcoders] Server Protocol for Half-Life


> Paul,
>
> Your response is cool. I knew I must be doing something wrong rather than
> there being a fault with the Servers or the protocol.
>
> Into what variable type do you read the response?

I did mine all in PHP for the web.

Take a look.
http://www.psychonet.co.uk/paul/HLSInfo/

Though I am in the middle of designing an admin type app or a status app for
Half-Life.

> I am using:
>
> TCHAR hl_resp[1024];
>
> In what way are you extracting the various components?
>
> I was doing something rather noddy, but it seemed to be working for the
most
> part:
>
> BYTE a = hl_resp[0];
> BYTE b = hl_resp[1];
> BYTE c = hl_resp[2];
> BYTE d = hl_resp[3];
>
> These bytes correspond to the opening 255 255 255 255 part of the code.

I use "����"

> Interestingly, from what I can understand of your hex dump, a . appears to
> be the terminating character of the string fields. If this is the case,
how
> are you managing to work out that in the following snippet of your
response:
>
> ...-dw.. which maps to:
>
> (string) . terminator for "CounterStrike"
>  (byte)  . 06 players
>  (byte)  . 12 Max Players allowed
>  (byte)  - 45
>  (byte)  d 'd' = Dedicated
>  (byte)  w 'w'  =  Windows
>  (byte)  . hex 00  = no password
>  (byte)  . hex 01 yes mod

> As you can see, some important information is dots, some dots are string
> terminators. I wonder if it is this distinction where I am tripping up.
>
> Any hints on how you are storing the response and parsing it please ?

As I said above mine was done in php.

> Simon

Paul Kirby

Webmaster of http://www.initcorp.co.uk
_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com


_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to