Winsock connect serverlist problem "SendData"(solved)
Hi,
Im trying to connect a game serverlist using winsock, and this is what im sending from the original program:
Code:
........a.A...A...AX.0...jmno7hdv
1F 00 01 02 00 E4 02 9C 61 BF 41 86 EA B9 41 A8 9C 9C 41 58 1D 30 00 08 00 6A 6D 6E 6F 37 68 64 76
When i send the exact string using winsock i wont get a reply.
Is there a table or something that will explain the HEX-values such as vbcrlf = ".." or "0D 0A", vbnullstring = "00" ect..
EDIT: wrong forums :blush:
thanks,
naitsabes
Re: Winsock connect serverlist problem "SendData"
Are you using the UDP protocol?
And what type of game server are you querying? I hope you're not sending the data as
Socket.SendData "1F 00 01" etc..
Those are hex values representing the actual characters being sent. To convert those hex values into normal characters, you would need to use the Chr$() function, like:
Socket.SendData Chr$("&H1F") & Chr$("&H00") etc...
Just use the Chr$() function, add quotes and a "&H" to the beginning to convert it from hex to ASCII.
Re: Winsock connect serverlist problem "SendData"
It uses Tpc protocol, i tried to send the string as i got it "........a.A...A...AX.0...jmno7hdv", but some dots might be important chracters like vbback or things like that.
The connect string always looks the same, never changes,
naitsabes
Re: Winsock connect serverlist problem "SendData"
The dots are usually chr$(0) so try replacing them with that.
Re: Winsock connect serverlist problem "SendData"
Do not treat the incoming data as a string, it is not a string. I'd be willing to help you if you mentioned which game it was.
Re: Winsock connect serverlist problem "SendData"
The problem here is that it sends all dots as HEX "2E", else this would work :cry:,
I got the hex values, but chr$("&h0") or chr$(0) = nothing...
naitsabes
Re: Winsock connect serverlist problem "SendData"
It would be helpful if you told us why you are sending that particular data, it might not be a problem with your program, it may just be the server isnt designed to respond to that kind of data
Re: Winsock connect serverlist problem "SendData"(solved)
Boy's and girl's i solved it thanks to DigiRev and the chr$ =),
naitsabes