iocp.py (1356B)
1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\carbon\common\lib\iocp.py 2 import blue 3 from eveprefs import prefs, boot 4 settingsCache = {} 5 6 def CheckForSetting(settingName): 7 result = settingsCache.get(settingName, None) 8 if result is None: 9 result = '/' + settingName in blue.pyos.GetArg() or prefs.GetValue(settingName, 0) == 1 or boot.GetValue(settingName, 0) == 1 10 settingsCache[settingName] = result 11 return result 12 13 14 def UsingIOCP(): 15 result = settingsCache.get('iocp', None) 16 if result is None: 17 result = '/iocp' in blue.pyos.GetArg() 18 if not result: 19 result = prefs.GetValue('socketIO', None) 20 if result is not None: 21 result = result.lower() == 'iocp' 22 else: 23 result = boot.GetValue('socketIO', 'stacklessio').lower() == 'iocp' 24 if result: 25 try: 26 import carbonio 27 except ImportError: 28 result = False 29 30 settingsCache['iocp'] = result 31 return result 32 33 34 def UsingCompression(): 35 return UsingIOCP() and CheckForSetting('iocpCompress') 36 37 38 def UsingHTTPS(): 39 return UsingIOCP() and UsingSSL() and CheckForSetting('https') 40 41 42 def UsingSSL(): 43 return UsingIOCP() and CheckForSetting('ssl') 44 45 46 def LoggingCarbonIO(): 47 return UsingIOCP() and CheckForSetting('logCarbonIO')