
org.bdware.dogp.sample.TestGateWaySystemMain Maven / Gradle / Ivy
package org.bdware.dogp.sample;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.bdware.dogp.NettyUDPDOGPAddressServer;
//直接数字对象定位模块与本网关处于同一进程
public class TestGateWaySystemMain {
static Logger LOGGER = LogManager.getLogger(TestGateWaySystemMain.class);
public static void main(String[] args) throws Exception {
LOGGER.info("Usage: java -cp doip-audit.jar:./libs/* org.bdware.dogp.sample.TestGateWaySystemMain [dstInjectAddress] [listenPort]" +
"\n\t\t in default,dstInjectAddress=127.0.0.1:21034 listenPort:21046 ");
String content = "127.0.0.1";
int port = 21034;
if (args.length > 0) {
String[] split = args[0].split(":");
content = split[0];
port = Integer.valueOf(split[1]);
}
int lport = 21046;
if (args.length > 1) {
lport = Integer.valueOf(args[1]);
}
LOGGER.info("configuration: inject dst: " + content + ":" + port + ", listen at: " + lport);
DOGPGatewayNaiveFiller filler = new DOGPGatewayNaiveFiller(content, port);
NettyUDPDOGPAddressServer server = new NettyUDPDOGPAddressServer(lport, filler);
server.start();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy