title: How to detect if a port is already in use in C on Linux?
body: <p>I'm writing a simple web server. I'd like to let the user set the port the server listen to,
  but how could I know if the port the user input is already in use or not?(if I know it's already in use, I can tell them to input another one.)</p>