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