slight update to ports
This commit is contained in:
parent
a2646f9718
commit
23cbafe048
@ -37,17 +37,17 @@ public class DiscordHandler {
|
||||
byte[] sendData = ResponseMsg.getBytes("UTF-8");
|
||||
int deliver_port = 0;
|
||||
switch (port) {
|
||||
case 48470:
|
||||
deliver_port = 48479;
|
||||
case 48474:
|
||||
deliver_port = 48470;
|
||||
break;
|
||||
case 48471:
|
||||
deliver_port = 48482;
|
||||
case 48475:
|
||||
deliver_port = 48471;
|
||||
break;
|
||||
case 48472:
|
||||
deliver_port = 48476;
|
||||
case 48476:
|
||||
deliver_port = 48472;
|
||||
break;
|
||||
case 48473:
|
||||
deliver_port = 48481;
|
||||
case 48477:
|
||||
deliver_port = 48473;
|
||||
break;
|
||||
}
|
||||
DatagramPacket sendPacket = new DatagramPacket(sendData, sendData.length, ipAddress, deliver_port);
|
||||
@ -56,13 +56,9 @@ public class DiscordHandler {
|
||||
|
||||
public static void handleUDPTraffic(int port, Datahandler datahandler,
|
||||
StanfordCoreNLP stanfordCoreNLP, StanfordCoreNLP stanfordCoreNLPSentiment) {
|
||||
|
||||
try (DatagramSocket serverSocket = new DatagramSocket(port)) {
|
||||
String hostIP = "";
|
||||
if (port == 48473 || port == 48471) {
|
||||
hostIP = "51.15.159.31";
|
||||
} else {
|
||||
hostIP = "195.154.53.196";
|
||||
}
|
||||
String hostIP = "195.154.53.196";
|
||||
InetAddress ipAddress = InetAddress.getByName(hostIP);//used ip'
|
||||
while (true) {
|
||||
receiveAndSendPacket(serverSocket, ipAddress, port, datahandler, stanfordCoreNLP, stanfordCoreNLPSentiment);
|
||||
@ -95,7 +91,7 @@ public class DiscordHandler {
|
||||
for (int i = 0; i < autismbotCount; i++) {
|
||||
final int j = i;
|
||||
new Thread(() -> {
|
||||
List<Integer> ports = List.of(48470, 48471, 48472, 48473);
|
||||
List<Integer> ports = List.of(48475, 48476, 48477, 48478);
|
||||
handleUDPTraffic(ports.get(j), datahandler, stanfordCoreNLP, stanfordCoreNLPSentiment);
|
||||
}).start();
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"udp_port": 48482,
|
||||
"chat_external_port": 48471,
|
||||
"udp_port": 48470,
|
||||
"chat_external_port": 48475,
|
||||
"steam_port": 29074,
|
||||
"server_ip_port": "135.125.188.157:27015"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user