Skip to content

Commit

Permalink
add more ipv6
Browse files Browse the repository at this point in the history
  • Loading branch information
LeiGlobus committed Nov 26, 2024
1 parent 95a6cff commit a284a5f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ def __init__(
self.zmq_socket.setsockopt(zmq.SNDTIMEO, SNDTIMEO)
if linger is not None:
self.zmq_socket.setsockopt(zmq.LINGER, linger)
self.zmq_socket.setsockopt(zmq.IPV6, True)

# all zmq setsockopt calls must be done before bind/connect is called
if self.mode == "server":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,16 +232,19 @@ def __init__(
self.context = zmq.Context()
self.task_incoming = self.context.socket(zmq.DEALER)
self.task_incoming.set_hwm(0)
self.task_incoming.setsockopt(zmq.IPV6, True)
self.task_incoming.RCVTIMEO = 10 # in milliseconds
log.info(f"Task incoming on tcp://{client_address}:{client_ports[0]}")
self.task_incoming.connect(f"tcp://{client_address}:{client_ports[0]}")

self.results_outgoing = self.context.socket(zmq.DEALER)
self.results_outgoing.set_hwm(0)
self.results_outgoing.setsockopt(zmq.IPV6, True)
log.info(f"Results outgoing on tcp://{client_address}:{client_ports[1]}")
self.results_outgoing.connect(f"tcp://{client_address}:{client_ports[1]}")

self.command_channel = self.context.socket(zmq.DEALER)
self.command_channel.setsockopt(zmq.IPV6, True)
self.command_channel.RCVTIMEO = 1000 # in milliseconds
# self.command_channel.set_hwm(0)
log.info(f"Command _channel on tcp://{client_address}:{client_ports[2]}")
Expand All @@ -260,8 +263,10 @@ def __init__(

self.task_outgoing = self.context.socket(zmq.ROUTER)
self.task_outgoing.set_hwm(0)
self.task_outgoing.setsockopt(zmq.IPV6, True)
self.results_incoming = self.context.socket(zmq.ROUTER)
self.results_incoming.set_hwm(0)
self.results_incoming.setsockopt(zmq.IPV6, True)

self.endpoint_id = endpoint_id
worker_bind_address = f"tcp://{self.interchange_address}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,9 @@ def __init__(
self.internal_worker_port_range = internal_worker_port_range

self.funcx_task_socket = self.context.socket(zmq.ROUTER)
self.funcx_task_socket.setsockopt(zmq.IPV6, True)
self.funcx_task_socket.set_hwm(0)
self.address = "127.0.0.1"
self.address = "::1"
self.worker_port = self.funcx_task_socket.bind_to_random_port(
"tcp://*",
min_port=self.internal_worker_port_range[0],
Expand Down

0 comments on commit a284a5f

Please sign in to comment.