Link master session with socket