本文整理汇总了Python中api.API.joinClient方法的典型用法代码示例。如果您正苦于以下问题:Python API.joinClient方法的具体用法?Python API.joinClient怎么用?Python API.joinClient使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类api.API
的用法示例。
在下文中一共展示了API.joinClient方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: int
# 需要导入模块: from api import API [as 别名]
# 或者: from api.API import joinClient [as 别名]
if line[0] == "retireServer":
serverId = int(line[1])
"""
Retire the server with the id specified. This should block until
the server can tell another server of its retirement
"""
api.retireServer(serverId)
if line[0] == "joinClient":
clientId = int(line[1])
serverId = int(line[2])
"""
Start a new client with the id specified and connect it to
the server
"""
api.joinClient(clientId, serverId)
if line[0] == "breakConnection":
id1 = int(line[1])
id2 = int(line[2])
"""
Break the connection between a client and a server or between
two servers
"""
api.breakConnection(id1, id2)
if line[0] == "restoreConnection":
id1 = int(line[1])
id2 = int(line[2])
"""
Restore the connection between a client and a server or between