sockets: allow port to be NULL when listening on IP address