pass client socket to use function