Port schmort - who cares ?
Clients typically don’t care what port they are assigned.
When you call bind you can tell it to assign you any available port:
myaddr.port = htons(0);
Previous slide
Next slide
Back to first slide
View graphic version