Giter Club home page Giter Club logo

Comments (4)

uakfdotb avatar uakfdotb commented on September 28, 2024

You can intercept the packet in GarenaTCP without having to modify GHost++.

from gcb.

Profforgr avatar Profforgr commented on September 28, 2024

You can intercept the packet in GarenaTCP without having to modify GHost++.

I am not sure how can i understand that it is 'map download start' 'map download finish' or simply 'map download' packet.

As a very temporary and very unstable test i made this:

in

handleLocalPacket (GarenaTCP.java)

I am using

data.length == 1460 || data.length == 1207

to detect map download packets.

Is there any better way, you know?

Full code (just for you to understand):
[initial purpose is to make special "maximumBufferedPackets" value for map downloads]

    synchronized(packets) {
        while(maximumBufferedPackets != 0 && ((packets.size() > maximumBufferedPackets) || ( packets.size() > 20 && (data.length == 1460 || data.length == 1207 )) ) ) { //let's wait a while before sending more
            Main.println(12, "[GarenaTCP " + conn_id + "] debug@" + System.currentTimeMillis() + ": " + conn_id + " waiting because of " + packets.size() + " packets");

            if(terminated) {
                //oh, we terminated, don't loop here forever!
                return;
            }

            try {
                packets.wait(100);
            } catch(InterruptedException e) {}

            //continue to standard retransmit packets
            standardRetransmission();
        }

        packets.add(packet);

        //also update the packet retransmit queue here
        packetRetransmitQueue.add(packet);
    }

from gcb.

uakfdotb avatar uakfdotb commented on September 28, 2024

Refer to http://bnetdocs.org/ . To initiate a download, the client will send to the server (player -> host bot) a W3GS_STARTDOWNLOAD packet (http://bnetdocs.org/?op=packet&pid=443). You can capture http://bnetdocs.org/?op=packet&pid=467 to get the client's current download status, including when they finish downloading (the total map size can be extracted from http://bnetdocs.org/?op=packet&pid=441 (sent from server to client).

from gcb.

Profforgr avatar Profforgr commented on September 28, 2024

Refer to http://bnetdocs.org/ . To initiate a download, the client will send to the server (player -> host bot) a W3GS_STARTDOWNLOAD packet (http://bnetdocs.org/?op=packet&pid=443). You can capture http://bnetdocs.org/?op=packet&pid=467 to get the client's current download status, including when they finish downloading (the total map size can be extracted from http://bnetdocs.org/?op=packet&pid=441 (sent from server to client).

Wow, awesome website and guide! Thanks. I'll mark it as closed and i'll try to make it following your guide.

from gcb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.