def isPublic(self, ipaddr):
if (Dreamr.server == True):
return True
else:
# Check if host's interface address is public
addrType = IPy.IP(ipaddr).iptype()
if (addrType == "PUBLIC"):
print("BECOME_SERVER")
return True
# Server Debug
if (DEBUG_MODE):
print("BECOME_SERVER_DEBUG")
return True
return False
# SERVER HANDLER THREAD | Fork off a client thread to handle the socket
# This is a connected client or server!
protocol.py 文件源码
python
阅读 26
收藏 0
点赞 0
评论 0
评论列表
文章目录