def __init__(self, dcFileNames=None, dcSuffix='', connectMethod=None, threadedNet=None): ClientRepositoryBase.__init__(self, dcFileNames=dcFileNames, dcSuffix=dcSuffix, connectMethod=connectMethod, threadedNet=threadedNet) self.setHandleDatagramsInternally(False) base.finalExitCallbacks.append(self.shutdown) # The doId allocator. The CMU LAN server may choose to # send us a block of doIds. If it chooses to do so, then we # may create objects, using those doIds. self.doIdAllocator = None self.doIdBase = 0 self.doIdLast = 0 # The doIdBase of the client message currently being # processed. self.currentSenderId = None # Explicitly-requested interest zones. self.interestZones = []
def disconnect(self): """ This implicitly deletes all objects from the repository. """ for do_id in self.doId2do.keys(): self.deleteObject(do_id) ClientRepositoryBase.disconnect(self)
def __init__(self, *args, **kwargs): ClientRepositoryBase.__init__(self, *args, **kwargs) base.finalExitCallbacks.append(self.shutdown) self.message_handlers = { CLIENT_HELLO_RESP: self.handleHelloResp, CLIENT_EJECT: self.handleEject, CLIENT_ENTER_OBJECT_REQUIRED: self.handleEnterObjectRequired, # Defined by DuckyDuck1553: CLIENT_ENTER_OBJECT_REQUIRED_OTHER: self.handleEnterObjectRequiredOther, CLIENT_ENTER_OBJECT_REQUIRED_OTHER_OWNER: self.handleEnterObjectRequiredOtherOwner, CLIENT_ENTER_OBJECT_REQUIRED_OWNER: self.handleEnterObjectRequiredOwner, CLIENT_OBJECT_SET_FIELD: self.handleUpdateField, CLIENT_OBJECT_SET_FIELDS: self.handleUpdateFields, CLIENT_OBJECT_LEAVING: self.handleObjectLeaving, CLIENT_OBJECT_LEAVING_OWNER: self.handleObjectLeaving, CLIENT_OBJECT_LOCATION: self.handleObjectLocation, CLIENT_ADD_INTEREST: self.handleAddInterest, CLIENT_ADD_INTEREST_MULTIPLE: self.handleAddInterestMultiple, CLIENT_REMOVE_INTEREST: self.handleRemoveInterest, CLIENT_DONE_INTEREST_RESP: self.handleInterestDoneMessage, }
def __init__(self, dcFileNames=None, dcSuffix='', connectMethod=None, threadedNet=None): ClientRepositoryBase.__init__(self, dcFileNames=dcFileNames, dcSuffix=dcSuffix, connectMethod=connectMethod, threadedNet=threadedNet) self.setHandleDatagramsInternally(False) base.finalExitCallbacks.append(self.shutdown) self.doIdAllocator = None self.doIdBase = 0 self.doIdLast = 0 self.currentSenderId = None self.interestZones = [] return
def __init__(self, *args, **kwargs): ClientRepositoryBase.__init__(self, *args, **kwargs) base.finalExitCallbacks.append(self.shutdown) self.message_handlers = {CLIENT_HELLO_RESP: self.handleHelloResp, CLIENT_EJECT: self.handleEject, CLIENT_ENTER_OBJECT_REQUIRED: self.handleEnterObjectRequired, CLIENT_ENTER_OBJECT_REQUIRED_OWNER: self.handleEnterObjectRequiredOwner, CLIENT_OBJECT_SET_FIELD: self.handleUpdateField, CLIENT_OBJECT_SET_FIELDS: self.handleUpdateFields, CLIENT_OBJECT_LEAVING: self.handleObjectLeaving, CLIENT_OBJECT_LOCATION: self.handleObjectLocation, CLIENT_ADD_INTEREST: self.handleAddInterest, CLIENT_ADD_INTEREST_MULTIPLE: self.handleAddInterestMultiple, CLIENT_REMOVE_INTEREST: self.handleRemoveInterest, CLIENT_DONE_INTEREST_RESP: self.handleInterestDoneMessage, }
def __init__(self, dcFileNames = None, dcSuffix = '', connectMethod = None, threadedNet = None): ClientRepositoryBase.__init__(self, dcFileNames = dcFileNames, dcSuffix = dcSuffix, connectMethod = connectMethod, threadedNet = threadedNet) self.setHandleDatagramsInternally(False) base.finalExitCallbacks.append(self.shutdown) # The doId allocator. The CMU LAN server may choose to # send us a block of doIds. If it chooses to do so, then we # may create objects, using those doIds. self.doIdAllocator = None self.doIdBase = 0 self.doIdLast = 0 # The doIdBase of the client message currently being # processed. self.currentSenderId = None # Explicitly-requested interest zones. self.interestZones = []
def handleUpdateField(self, di): # The CMU update message starts with an additional field, not # present in the Disney update message: the doIdBase of the # original sender. Extract that and call up to the parent. self.currentSenderId = di.getUint32() ClientRepositoryBase.handleUpdateField(self, di)
def handleUpdateField(self, di): self.currentSenderId = di.getUint32() ClientRepositoryBase.handleUpdateField(self, di)
def disconnect(self): for do_id in self.doId2do.keys(): self.deleteObject(do_id) ClientRepositoryBase.disconnect(self)