title: Websocket - "Address already in use"
body: <p>i used the files contained in this post: <a href="http://www.flynsarmy.com/2012/02/php-websocket-chat-application-2-0/" rel="nofollow">http://www.flynsarmy.com/2012/02/php-websocket-chat-application-2-0/</a>. Then i infused them into my codeigniter lab, but i always get an error:</p>
  
  <pre><code>Message: socket_bind() [function.socket-bind]: unable to bind address [48]: Address already in use
  </code></pre>
  
  <p>The JS-part tells me:</p>
  
  <pre><code>Connecting...
  Connected.
  Disconnected.
  </code></pre>
  
  <p>I used the suggested "gethostbyaddr(gethostbyname($_SERVER['SERVER_NAME'])"-method and also tried the ip without any result.</p>
  
  <p>I guess i have a logical error. Do i need to close the server-side socket first before i can reopen it? I also tried to run the "out-of-the-box"-version (with the correct hostnames), but still no luck.</p>
  
  <p>Thanks for your help!</p>
  
  <p>Live: <a href="http://labs.addictivity.de/websockets/" rel="nofollow">http://labs.addictivity.de/websockets/</a></p>