title: Swift 2 check if port is busy
body: <p>can someone tell me how to find out in Swift2 if Port is busy?</p>
  
  <p>Because I write a mac app that has a self written Tcp server, but sometimes it wont start up because it "<em>cant bind to port</em>". So how can I check if the port is not used, to block the start button of the Tcp server until the port is free, again?</p>
  
  <p>And I do not want a new framework.</p>
  
  <p>Thanks</p>