aboutsummaryrefslogtreecommitdiffstats
path: root/python/trx/udp_link.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/trx/udp_link.py')
-rw-r--r--python/trx/udp_link.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/trx/udp_link.py b/python/trx/udp_link.py
index d96a6aa..efa701b 100644
--- a/python/trx/udp_link.py
+++ b/python/trx/udp_link.py
@@ -26,10 +26,10 @@ import socket
import select
class udp_link:
- def __init__(self, remote_addr, remote_port, bind_port):
+ def __init__(self, remote_addr, remote_port, bind_addr = '0.0.0.0', bind_port = 0):
self.sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
self.sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
- self.sock.bind((remote_addr, bind_port))
+ self.sock.bind((bind_addr, bind_port))
self.sock.setblocking(0)
# Save remote info