本文整理匯總了Python中Box.Box.sentOfflinePost方法的典型用法代碼示例。如果您正苦於以下問題:Python Box.sentOfflinePost方法的具體用法?Python Box.sentOfflinePost怎麽用?Python Box.sentOfflinePost使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Box.Box
的用法示例。
在下文中一共展示了Box.sentOfflinePost方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: MainWindow
# 需要導入模塊: from Box import Box [as 別名]
# 或者: from Box.Box import sentOfflinePost [as 別名]
#.........這裏部分代碼省略.........
_ServerSettingsShield = ServerSettingsShield(self)
self.serverDOWN.connect(_ServerSettingsShield.preInitServer)
_ServerSettingsShield.exec_()
self.serverDOWN.disconnect(_ServerSettingsShield.preInitServer)
def showProxySettingsShield(self):
_ProxySettingsShield = ProxySettingsShield(self)
_ProxySettingsShield.exec_()
'''def showColorSettingsShield(self):
_ColorSettingsShield = ColorSettingsShield(self)
_ColorSettingsShield.exec_()'''
def confirmAction(self, address):
_ConfirmRequest = ConfirmRequest(address, self)
confirm = _ConfirmRequest.exec_()
def disconnectSignals(self):
if 'contactMessage' in dir(self) :
self.contactMessage.disconnect(self.receiveBroadcastMessage)
if 'changeConnectState' in dir(self) :
self.changeConnectState.disconnect(self.initAvahiBrowser)
if 'initServeR' in dir(self) :
self.initServeR.disconnect(self.checkNetwork)
if 'reinitServer' in dir(self) :
self.reinitServer.disconnect(self.checkNetwork)
if 'serverDown' in dir(self) :
self.serverDown.disconnect(self.menuTab.preStartServer)
def stopServices(self, restart = False, loadFile = '', mode = ''):
if restart : self.statusBar.showMessage('Restart Services')
else : self.statusBar.showMessage('Stop Services')
# send offline packet
self.menuTab.sentOfflinePost()
# caching stop
if not restart and 'cachingThread' in dir(self) :
self.cachingThread._shutdown()
self.cachingThread.quit()
#del self.cachingThread
# stop services
if not restart and 'avahiBrowser' in dir(self) :
if '__del__' in dir(self.avahiBrowser) : self.avahiBrowser.__del__()
self.avahiBrowser = None
if not restart and 'avahiService' in dir(self) :
if '__del__' in dir(self.avahiService) : self.avahiService.__del__()
self.avahiService = None
if not restart and 'udpClient' in dir(self) :
self.udpClient.stop()
'''# send 'close session' request
try :
for item in self.USERS.iterkeys() :
_addr, _port = item.split(':') if item in self.USERS else ('', '')
addr = str(_addr); port = str(_port)
if self.USERS[item][3] == 'Yes' :
encode = True
else :
encode = False
if addr in self.serverThread.Obj.currentSessionID and addr != self.server_addr :
sessionID = self.serverThread.Obj.currentSessionID[addr][0]
print addr, sessionID, ' send "close session" request'
clnt = ToolsThread(\
xr_client(\
addr, \
port, \
self, \
self, \