mirror of https://github.com/flaggo/pydu.git
add docstring for request
This commit is contained in:
parent
306a7ef235
commit
72cdcf31bd
|
@ -103,6 +103,10 @@ def download(url, dst=None):
|
|||
|
||||
|
||||
def check_connect(ip, port, retry=1, timeout=0.5):
|
||||
"""
|
||||
Check whether given ip and port could connect or not.
|
||||
It will retry and timeout on given.
|
||||
"""
|
||||
while retry:
|
||||
try:
|
||||
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
|
|
Loading…
Reference in New Issue