Compare commits

...

2 Commits

Author SHA1 Message Date
Tristan B. Velloza Kildaire
5721a17ab4
Merge 5c6ee07d66 into 6a392fdb0f 2024-09-05 15:23:44 +02:00
Tristan Brice Velloza Kildaire
5c6ee07d66 TCPInterface
- When connect(s, Bool)` is called construct a socket that supports both address families
2024-09-05 00:07:35 +02:00

View File

@ -200,7 +200,7 @@ class TCPClientInterface(Interface):
if initial:
RNS.log("Establishing TCP connection for "+str(self)+"...", RNS.LOG_DEBUG)
self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
self.socket = socket.socket(socket.AF_INET|socket.AF_INET6, socket.SOCK_STREAM)
self.socket.settimeout(TCPClientInterface.INITIAL_CONNECT_TIMEOUT)
self.socket.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
self.socket.connect((self.target_ip, self.target_port))