Use the environment variable TMPDIR when defined for the socket