Alright, I'm trying to create a program in VB6 with winsock to query a server when given it's ip and port. Now I succesfully have done this, my question is how would you go about parsing this data? Some of it is in raw bytes so you'd need to asc() it (the protocol, ammount of players etc is all in bytes) but I don't know how to seperate all the information.
Source Protocol
The link above has information on the source protocol, it isn't to much different from half-life.
Each bit of information is serperated by a null byte, but I can't figure out how to do this:
BTW I've already alterted it so the 4 consecutive bytes no longer are in the received data.
[Placebo Code]
Take all the information from the beginning up until the null byte - 1.
Store it in the server name string.
Take all the information from the last null byte + 1 to the next null byte -1.
Store it in the server map string.
etc.
etc.
If I have reached the end of the packet, exit this function/procedure.
[/Placebo Code]
Anyone have any experience with winsock, vb6, and the Half-Life protocol?
Source Protocol
The link above has information on the source protocol, it isn't to much different from half-life.
Each bit of information is serperated by a null byte, but I can't figure out how to do this:
BTW I've already alterted it so the 4 consecutive bytes no longer are in the received data.
[Placebo Code]
Take all the information from the beginning up until the null byte - 1.
Store it in the server name string.
Take all the information from the last null byte + 1 to the next null byte -1.
Store it in the server map string.
etc.
etc.
If I have reached the end of the packet, exit this function/procedure.
[/Placebo Code]
Anyone have any experience with winsock, vb6, and the Half-Life protocol?