All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.bdware.dogp.sample.TestAddressSystemMain Maven / Gradle / Ivy

There is a newer version: 1.5.4
Show newest version
package org.bdware.dogp.sample;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.bdware.dogp.NettyUDPDOGPAddressServer;

public class TestAddressSystemMain {
    static Logger LOGGER = LogManager.getLogger(TestAddressSystemMain.class);

    public static void main(String[] args) throws Exception {
        LOGGER.info("Usage: java -cp doip-audit.jar:./libs/* org.bdware.dogp.sample.TestAddressSystemMain [dstInjectAddress] [listenPort]" +
                "\n\t\t in default,dstInjectAddress=192.168.1.1:8888 listenPort:21044 ");
        String content = "192.168.1.1";
        int port = 8888;
        if (args.length > 0) {
            String[] split = args[0].split(":");
            content = split[0];
            port = Integer.valueOf(split[1]);
        }
        int lport = 21044;
        if (args.length > 1) {
            lport = Integer.valueOf(args[1]);
        }
        LOGGER.info("configuration: inject dst: " + content + ":" + port + ", listen at: " + lport);
        DOGPDstNaiveFiller filler = new DOGPDstNaiveFiller(content, port);
        NettyUDPDOGPAddressServer server = new NettyUDPDOGPAddressServer(lport, filler);
        server.start();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy