If no Port is specified, set myport to actual port of first listening socket.