diff --git a/README.md b/README.md index 8aabb40..4fb7c77 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,7 @@ Then, run the following command to install the required dependencies: ```sh pip install -r requirements.txt ``` +* Be sure to change the `ADDRESS` variable in `notification_listener.py` to the IP address of the server you want to listen to. * To build the project, run the following command: diff --git a/notification_listener.py b/notification_listener.py index 506534b..d913b94 100644 --- a/notification_listener.py +++ b/notification_listener.py @@ -4,7 +4,8 @@ import socket -ADDRESS = '192.168.200.2' +# Put the IP address of the server here +ADDRESS = '' PORT = 14141 def main(): diff --git a/src/main/java/name/connectionnotify/NotificationServer.java b/src/main/java/name/connectionnotify/NotificationServer.java index c372e61..b3d8ec3 100644 --- a/src/main/java/name/connectionnotify/NotificationServer.java +++ b/src/main/java/name/connectionnotify/NotificationServer.java @@ -1,7 +1,7 @@ package name.connectionnotify; import java.util.ArrayList; - +import java.net.InetAddress; import java.net.ServerSocket; import java.net.Socket; @@ -20,7 +20,7 @@ public NotificationServer(Logger logger) LOGGER = logger; try { - server_socket = new ServerSocket(PORT); + server_socket = new ServerSocket(PORT, 0, InetAddress.getByAddress(new byte[] {0, 0, 0, 0})); } catch (Exception e) {