Inherits objects::logic::common::threads::appThreadBase::appThreadBase.
Public Member Functions | |
| def | run |
Public Attributes | |
| killSwitch | |
This class essentially is the main collector of raw network data.
Definition at line 32 of file pcapyImplementation.py.
| def objects.logic.network.pcapyImplementation.pcapyWorkerThread.run | ( | self | ) |
Definition at line 34 of file pcapyImplementation.py.
00034 : 00035 logger.log("Starting Network Capture worker thread.") 00036 while(self.killSwitch == False): 00037 00038 try: 00039 self.parent.deviceObject.dispatch(100, self.parent.handleReceivePacet) 00040 except Exception, ex: 00041 logger.log(__name__ + ": There was an unknown Error while listening to network packet stream") 00042 logger.log(ex) 00043 00044 self.killSwitch = True 00045 if self.parent.errorCallBackFunc is not None: 00046 self.parent.errorCallBackFunc(ex) 00047 00048 except pcapy.PcapError, pce: 00049 logger.log(__name__ + ": There was an Pcapy Error while listening to network packet stream") 00050 logger.log(pce) 00051 00052 self.killSwitch = True 00053 if self.parent.errorCallBackFunc is not None: 00054 self.parent.errorCallBackFunc(pce) 00055 00056 finally: 00057 self.threadEvent.set() 00058 self.threadEvent.clear() 00059 00060 logger.log(__name__ + "Network Capture worker thread is done") 00061 00062 ## the pcapyImplementation is the implementation of the captureInterface interface using
Reimplemented from objects.logic.common.threads.appThreadBase.appThreadBase.
Definition at line 36 of file pcapyImplementation.py.
1.5.8