add getPortNum() to return auto-assigned port number
add getPortNum() to return auto-assigned port number