diff --git a/backend/P2PClient.py b/backend/P2PClient.py index 8f3ede2..936dac8 100644 --- a/backend/P2PClient.py +++ b/backend/P2PClient.py @@ -9,7 +9,7 @@ from pathlib import Path from utils import get_filename_by_file_id -from config import DISCOVERY_PORT, CHAT_PORT, MAX_UDP_PACKET, IP +from config import DISCOVERY_PORT, CHAT_PORT, MAX_UDP_PACKET, DISCOVERY_ADDRESS class P2PClient: @@ -48,7 +48,7 @@ def announce_presence(self): 'user_id': self.user_id, }) self.discovery_socket.sendto( - response.encode(), (IP, DISCOVERY_PORT)) + response.encode(), (DISCOVERY_ADDRESS, DISCOVERY_PORT)) time.sleep(2) def request_file_fingerprint(self, file_id): diff --git a/backend/config.py b/backend/config.py index 9497f13..edce55e 100644 --- a/backend/config.py +++ b/backend/config.py @@ -1,4 +1,4 @@ DISCOVERY_PORT = 5000 CHAT_PORT = 5001 MAX_UDP_PACKET = 65507 -IP = '192.168.181.255' +DISCOVERY_ADDRESS = '192.168.181.255'