Skip to content

Commit

Permalink
Update to accept any address
Browse files Browse the repository at this point in the history
  • Loading branch information
badcodecat committed May 29, 2024
1 parent ccbd3e1 commit e310276
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
3 changes: 2 additions & 1 deletion notification_listener.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

import socket

ADDRESS = '192.168.200.2'
# Put the IP address of the server here
ADDRESS = ''
PORT = 14141

def main():
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/name/connectionnotify/NotificationServer.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package name.connectionnotify;

import java.util.ArrayList;

import java.net.InetAddress;
import java.net.ServerSocket;
import java.net.Socket;

Expand All @@ -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)
{
Expand Down

0 comments on commit e310276

Please sign in to comment.