Hi,

Thanks for the help so far guys, you've been a great help.

I now have a class that queries the details command from a server and breaks
it into its proper pieces.

I would like the facility to ping a server to find out how fast (or slow!)
it is currently running.

Does anyone know of a technique for doing this?

S

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of alfred
Sent: 23 February 2002 22:29
To: [EMAIL PROTECTED]
Subject: Re: [hlcoders] Server Protocol for Half-Life


<snip?
>>I am now having trouble converting a hex string (such as AF79E00) into
it's
>>corresponding long value (184,000,000).
>>
>>Any ideas?
>>
>
> float fTime = *(float *)&buffer[offset];

That will cast the 4 bytes of the ascii chars to a float value, which
won't be the float value of the hex string. Try

     long int strtol(const char *nptr, char **endptr, int base);

:)


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


--
Alfred Reynolds
[EMAIL PROTECTED]

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

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

Reply via email to