[REFACTOR] in app socket management