本文整理汇总了Python中socketIO_client.SocketIO.off方法的典型用法代码示例。如果您正苦于以下问题:Python SocketIO.off方法的具体用法?Python SocketIO.off怎么用?Python SocketIO.off使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类socketIO_client.SocketIO
的用法示例。
在下文中一共展示了SocketIO.off方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: print
# 需要导入模块: from socketIO_client import SocketIO [as 别名]
# 或者: from socketIO_client.SocketIO import off [as 别名]
global rawSequence
rawSequence = args
if (sequenceHasChanged(rawSequence) == True):
newSequence = True
print("Sequence has changed")
#prevRawSequence = rawSequence
global prevRawSequence
prevRawSequence = rawSequence
print(prevRawSequence)
print(rawSequence)
#Before the first message, the Pi keeps receiving (u'[8,8,8,8]')
while (rawSequence == "(u'[8,8,8,8]')"):
socketIO.on("sequencePi", on_a_response)
socketIO.wait(seconds = 0.6)
socketIO.off("sequencePi")
while (gameOver == False):
socketIO.on("sequencePi", on_a_response)
socketIO.wait(seconds=0.4)
socketIO.off("sequencePi")
if newSequence:
#SET FROM SERVER
recMessage = "this is purely a message"
recSequence = ""
if (contentIsMessage):
#Process message and send to Arduino
oString = "m " + recMessage + "|"