Emit attach/detach from client