I have been searching for nearly 2 hours now and didn't get a solution for this problem.
I want to connect to a Gameserver via the quake3 protocoll: Quake 3 Protocol
But everytime when I tried to send getstatus, I get the response "disconnect" from the server.
In Delphi I can send this like that:
But how to declare this variable in c++ in order to get the right Server response???
send := #$FF#$FF#$FF#$FF+'getstatus'+#$00;
Is that supposed to be a string? Then write it as a string: "\xFF\xFF\xFF\xFFgetstatus\0".
(Edit: I'm including the explicit null-terminator 'cause you did. If you don't need two null terminators you can leave the explicit one out.)
yes actually in Delphi it's a simple string, but I've read in some c# boards, that you have to send this in bytes or something like that.
Sorry \xFF\xFF\xFF\xFFgetstatus\0 doesn't work. It simply returns disconnect.
P.s. I'm using the IndyUDP Component for that (by the way)
Sry for double posting. I didn't clicked at the right button :eek:
I've never used the protocol, so all I know is that the string you wanted looks like what I wrote above. What you are supposed to do with it is up to you.
Hmm okey thanks, I'll try this not using strings ...
Firstly, you will have problems with embedded zero's with C string functions, that could be a problem. Then again, following your link above, the getstatus request is terminated by a line feed character, NOT zero...
FF FF FF FF 67 65 74 73 74 61 74 75 73 0A ;˙˙˙˙getstatus.