How do I detect the Ephemeral Port Range at run time in C++ on my machine
I have code that runs on several platforms windows and linux various versions, and I need to determine while running what the ephemeral port range is on the machine. Is there a way to do this programatic开发者_JAVA技巧ally?
Thank you,
I doubt you'd find a single portable method.
There is a handy guide that explains how the range is configured on various platforms: http://www.ncftp.com/ncftpd/doc/misc/ephemeral_ports.html
精彩评论