SocketAPI:  use the canonical path

Issue #2591