code: def register(self, name, callback, filter):
          
          if name in self.names:
              raise ValueError("A callback has already been registered with \
                               the name '%s'" % name)
  
          self.handlers.append({
              'name': name,
              'callback': callback,
              'filter': filter
          })
  
          self.names.add(name)
docs: register: string, function: string, data -> None,
          function: data -> boolean -> None
  
          Register will save the given name, callback, and filter function
          for use when a packet arrives. When one arrives, the filter
          function will be called to determine whether to call its associated
          callback function. If the filter method returns true, the callback
          method will be called with its associated name string and the packet
          which triggered the call.