Here's the deal.. While practicing in my free time Networking in java
I had an idea of making a RCON manipulator for a Quake 3 server which is written in C and has its very own quake language as well
The packets it receives and sends are encoded in C ANSI
So my questions are
Should i be using Datagram? Been trying with it though not achieving anything practically it wouldn't even compile though i have been going blindly with out really being sure of datagram's usage
In C its like
(using the winapi library)NET_SendPacket( addr, "\xFF\xFF\xFF\xFFrcon pass map blabla" );
"\xFF\xFF\xFF\xFFrcon pass map blabla" is the message that i want to send to the server, quake 3 machine uses UDP protocol
xFF is byte for -1 which is the formula the quake 3 machine based server i have uses, so basically its like saying "-1-1-1-1rcon pass map blabla" but in theory if i do
String a = "-1";
and try to do the byte decode method to turn -1 to byte it would be 2 bytes..
so basically there should be something equivalent.. I have seen many JAVA programs interfering with ansi packet using programs. I do understand that java uses UTF - 8 by default if not mistaken while i need it encoded in ansi..
Basically forgive me if i made several mistakes in the way i am trying to give you to understand my problem but i am so confused.. I just read so many things so many posts about byte handling and other things that my brain is currently dis organised.. Also please have in mind that i am not any C specialist or Java specialist none the less i do thing that such an issue goes to the java advanced forum.. I am merely using java 1 year now.