Skip to content

Commit

Permalink
Added documentation for getRandomPort fn
Browse files Browse the repository at this point in the history
  • Loading branch information
ganeshchowdarynune authored and canewsin committed Oct 8, 2022
1 parent ba96654 commit d570354
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/File/FileServer.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ def __init__(self, ip=config.fileserver_ip, port=config.fileserver_port, ip_type
self.ui_server = None

def getRandomPort(self, ip, port_range_from, port_range_to):
"""Generates Random Port from given range
Args:
ip: IP Address
port_range_from: From Range
port_range_to: to Range
"""
self.log.info("Getting random port in range %s-%s..." % (port_range_from, port_range_to))
tried = []
for bind_retry in range(100):
Expand Down

0 comments on commit d570354

Please sign in to comment.