Exemple #1
0
 def __init__(self, host, port=8000, coap=5683):
     self.host = host
     if coap > 0:
         self.coapport = coap
         self.coapclient = COAPClient()
     else:
         self.coapclient = None
     if port > 0:
         self.httpclient = httplib.HTTPConnection(host, port)
     else:
         self.httpclient = None
     self.forceHttp = False
     self.coapfailure = 0
     self.maxfailure = 2
     self.auth = None