def set_receive_callback(self, callback, *args, **kwargs):
        """The callback function called after each receipt of any data."""
        self.data_callback = callback
        self.data_callback_kwargs = kwargs