Package sparked :: Package hardware :: Module network :: Class NetworkWebConnectionService
[hide private]
[frames] | no frames]

Class NetworkWebConnectionService

source code

twisted.application.service.Service --+
                                      |
                                     NetworkWebConnectionService

Checks if the network connection is up by trying to reach a website.

Instance Methods [hide private]
 
startService(self) source code
 
loop(self) source code
 
event(self, connected=False)
Event from networkmanager came in.
source code

Inherited from twisted.application.service.Service: __getstate__, __providedBy__, disownServiceParent, privilegedStartService, setName, setServiceParent, stopService

Class Variables [hide private]
  url = 'http://www.google.com/'
  delay = 30

Inherited from twisted.application.service.Service: __implemented__, __provides__, name, parent, running

Method Details [hide private]

startService(self)

source code 
Overrides: twisted.application.service.Service.startService

event(self, connected=False)

source code 

Event from networkmanager came in. If network connection is down, do not try to fetch webpages.