Capture socket by reference, request by value to fix compile error