Create network.py

This commit is contained in:
qiaofeng1227 2023-02-22 09:14:44 +08:00 committed by GitHub
parent 2ec6e25756
commit 612309c668
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,18 @@
import os, io, sys, platform, shutil, time, json, datetime
# 根据依赖文件提供的port判断是否启动
def get_start_port(port):
print("目前检查"+port+"是否被占用")
if 端口被占用:
port=port+1
继续判断端口是否被占用只要没有被占用
use_port=xxxport
else:
use_port=xxxport
return use_port