Author Topic: feedback on lobby protocol  (Read 2665 times)

0 Members and 1 Guest are viewing this topic.

Offline vEsP@

  • Major(1)
  • Posts: 14
feedback on lobby protocol
« on: August 24, 2008, 08:03:09 pm »
just need to connect to it sending the request string to test a application...

but i dunno how it works

i´ll be apreciated if someone explains me


Offline vEsP@

  • Major(1)
  • Posts: 14
Re: feedback on lobby protocol
« Reply #2 on: August 26, 2008, 12:06:50 am »
already found this link and tried from many ways to connect to lobby and then receive an answer...

the ways were:
netcat
telnet
c network app (myscript)
java network app(myscript)

tried at
TCP rr.soldat.pl 13073 throught sockets... connects and send the request string, none answer taken
UDP rr.soldat.pl 13073 thoght datagrams... nothing either

the only way i found to solve my problem was to make a java application that implements a parser and then connect throught TCP/IP on port 80 (rr.soldat.pl) using GET METHOD throught / so with this i could parse and filter thought html tags of reply context from lobby to gather the data....

It´s not my style of service but i need to implement some other funcionalities cannot stop my project because of this connection error/misunderstood

Still waiting if someone give me a "real" feedback of this by simple showing me a screenshot of a lobby answer through netcat for example...
I´m no php programmer
even no ruby programmer
couldn ´t understand none of the parser algorithims

i don´t know how to speak english
i really fucked up

and it´s not the first time those who "have" the information
refuses to "share it"

sorry about anything

Offline iDante

  • Veteran
  • *****
  • Posts: 1967
Re: feedback on lobby protocol
« Reply #3 on: August 26, 2008, 12:11:26 am »
What exactly do you need? If you just need to see what kind of stuff gets sent from the lobby then just set up a java application that has one thread that simply echos everything from the server to the console and another that queries the server for info...

Offline vEsP@

  • Major(1)
  • Posts: 14
Re: feedback on lobby protocol
« Reply #4 on: August 26, 2008, 12:30:17 am »
just an answer string...and something to prove that is the kind of data i really want to parse and put into a collection or something.....

the point is....

my real test tool is netcat.....

i can gather any info from any protocol with them
but in that case i have received 0 bytes from lobby...

i cant figure if is the request string, port or url that is wrong...

tryed at rr.soldat.pl
using UDP/TCP both were tested
on port 13073
binding it to 13073/ and not binding

Date Posted: August 26, 2008, 01:29:21 am
What exactly do you need? If you just need to see what kind of stuff gets sent from the lobby then just set up a java application that has one thread that simply echos everything from the server to the console and another that queries the server for info...

basically this

Offline jrgp

  • Administrator
  • Flamebow Warrior
  • *****
  • Posts: 5037
Re: feedback on lobby protocol
« Reply #5 on: August 26, 2008, 12:51:02 am »
You open a TCP connection to rr.soldat.pl on port 13073 and send a string separated by copyright symbols with your preferences between them. You will get a massive reply with all of the soldat servers.

Read this for real: http://devs.soldat.pl/wiki/index.php/Client-Lobby_Protocol
There are other worlds than these

Offline vEsP@

  • Major(1)
  • Posts: 14
Re: feedback on lobby protocol
« Reply #6 on: August 28, 2008, 10:37:15 am »
analize this...

Code: [Select]
import java.io.IOException;
import java.net.Socket;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.io.DataOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.SocketException;

public class TCPLobbyConnection {

    private Socket socket;
    private InetAddress IPAddress;
    private String result ;

    public TCPLobbyConnection(String message) {
        try {
            byte[] sendData = new byte[1024];
            byte[] receiveData = new byte[1024];
            socket = new Socket("rr.soldat.pl", 13073);
            sendData = message.getBytes();
            // output/input implementation
            DataOutputStream outToServer =
                    new DataOutputStream(socket.getOutputStream());
            BufferedReader inFromServer =
                    new BufferedReader(new InputStreamReader(
                    socket.getInputStream()));
            // send the data
            outToServer.writeBytes(message);
           
            String result = inFromServer.readLine() ;
            System.out.println(result) ;
        // STREAMS READY
        } catch (UnknownHostException uhe) {
            uhe.printStackTrace();
        } catch (SocketException se) {
            se.printStackTrace() ;
        } catch (IOException ioe) {
            ioe.printStackTrace();
        }
       
    }
   
   
   
}

Please if someone could help me on this....
at the end of this code the variable String "result" should contains data gathered from lobby connection...

this same code gathers other types of data in other protocols....
to test it just replace de url (rr.soldat.pl) and the port....

in the constructor the parameter String sent to it actually is the request string
in ex: e©42©0©0©0©0©0©0©0©0©0©0©-1©0


something like this....

Date Posted: August 26, 2008, 11:41:24 am
maybe not working if implemented a buffered input???

just don´t know how to communicate with lobby

another question... if someone have gathered the information from lobby
how is the reply lenght? number of chars and number of bytes....


Date Posted: August 26, 2008, 11:46:34 am
still looking for help

Offline urraka

  • Soldat Developer
  • Flagrunner
  • ******
  • Posts: 703
Re: feedback on lobby protocol
« Reply #7 on: August 28, 2008, 11:46:58 am »
Are you sending the '\n' character at the end?
urraka

Offline chrisgbk

  • Inactive Staff
  • Veteran
  • *****
  • Posts: 1739
Re: feedback on lobby protocol
« Reply #8 on: August 28, 2008, 02:03:20 pm »
Copied from my other reply:

Code: [Select]
IDTCPClient1.Host := 'rr.soldat.pl';
IDTCPClient1.Port := 13073;
IDTCPClient1.Connect;
IDTCPClient1.Write('e©42©0©0©0©0©0©0©0©0©0©0©-1©0'#10);

while true do begin
  line := IDTCPClient1.ReadLn();
  memo1.Lines.Add(line);
  if line = 'h©©©©©' then break;
end;

Works just fine

The lobby's response is variable length depending on how many servers are active.
« Last Edit: August 30, 2008, 09:08:34 am by chrisgbk »

Offline vEsP@

  • Major(1)
  • Posts: 14
Re: feedback on lobby protocol
« Reply #9 on: August 29, 2008, 10:19:33 am »
thank you u just save my life...

showing me this code u was the first to reply a very single question i had made...
even with pascal, i don´t care...

fine... i will work on my code for now, using writeUTF() instead of getByes() method...

thank u very much
i will post the progress of the application and soon as it gets an stable funcional version i´ll post it here