copy port number correctly for xdm socket address