title: PeerJS - Manually close the connection between peers
body: <p>I use <a href="http://peerjs.com/docs/" rel="nofollow">PeerJS</a> for my P2P application (a multiplayer game).
  Everything is great (connection between peers, sending data), but I can't figure out how to <strong>manually close the connection between peers</strong>.</p>
  
  <p>In docs are functions to "<em>Close the connection to the server</em>" or "<em>Close the connection to the server and terminate all existing connections</em>" (<code>peer.disconnect()</code>,<code>peer.destroy()</code>), but I just want to "<strong><em>terminate existing connections</em></strong>", not to "<em>close the connection to the server</em>".</p>
  
  <p>I know I can handle connections in array and sending/receiving data just for peers with some status (like "connected" or "disconnected"), but other peers can sending data to me for overloading forexample (hackers > ddos...), so basically I want to have opportunity to give something like BAN.</p>
  
  <p>Any ideas (sorry for bad english)?</p>
  
  <p><strong>SOLVED:</strong></p>
  
  <p>I must be really blind. There is <code>DataConnection.close()</code> function to close the connection between peers.</p>
  
  <p><a href="http://peerjs.com/docs/#dataconnection-close" rel="nofollow">http://peerjs.com/docs/#dataconnection-close</a></p>