#NEWLINE# def __init__( self , ipAddress = '' , udpPort = d . DEFAULT_UDP_PORT , testing = False ) : #NEWLINE# #INDENT# self . ipAddress = ipAddress #NEWLINE# self . udpPort = udpPort #NEWLINE# self . name = 'coap@[{0}]:{1}' . format ( self . ipAddress , self . udpPort ) #NEWLINE# self . resourceLock = threading . Lock ( ) #NEWLINE# self . tokenizer = t . coapTokenizer ( ) #NEWLINE# self . resources = [ ] #NEWLINE# self . transmittersLock = threading . RLock ( ) #NEWLINE# self . transmitters = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# self . ackTimeout = d . DFLT_ACK_TIMEOUT #NEWLINE# self . respTimeout = d . DFLT_RESPONSE_TIMEOUT #NEWLINE# if testing : #NEWLINE# #INDENT# self . socketUdp = socketUdpDispatcher ( ipAddress = self . ipAddress , udpPort = self . udpPort , callback = self . _receive ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . socketUdp = socketUdpReal ( ipAddress = self . ipAddress , udpPort = self . udpPort , callback = self . _receive )