tkonolige commented on a change in pull request #7757:
URL: https://github.com/apache/tvm/pull/7757#discussion_r603440960



##########
File path: python/tvm/rpc/proxy.py
##########
@@ -484,6 +486,87 @@ def _proxy_server(
     handler.run()
 
 
+class PopenProxyServerState(object):
+    """Internal PopenProxy State for Popen"""
+
+    current = None
+
+    def __init__(
+        self,
+        host,
+        port=9091,
+        port_end=9199,
+        web_port=0,
+        timeout_client=600,
+        timeout_server=600,
+        tracker_addr=None,
+        index_page=None,
+        resource_files=None,
+    ):
+
+        sock = socket.socket(base.get_addr_family((host, port)), 
socket.SOCK_STREAM)
+        self.port = None
+        for my_port in range(port, port_end):
+            try:
+                sock.bind((host, my_port))
+                self.port = my_port
+                break
+            except socket.error as sock_err:
+                if sock_err.errno in [98, 48]:

Review comment:
       Are these the same on windows? @rkimball 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to