def _on_client_connect(self, data):
client = None<EOL>if data.get('<STR_LIT:id>') in self._clients:<EOL><INDENT>client = self._clients[data.get('<STR_LIT:id>')]<EOL>client.update_connected(True)<EOL><DEDENT>else:<EOL><INDENT>client = Snapclient(self, data.get('<STR_LIT>'))<EOL>self._clients[data.get('<STR_LIT:id>')] = client<EOL>if self._new_client_callback_func and callable(self._new_client_callback_func):<EOL><INDENT>self._new_client_callback_func(client)<EOL><DEDENT><DEDENT>_LOGGER.info('<STR_LIT>', client.friendly_name)<EOL>
Handle client connect.