title: What is the difference between WebRTC and WebSockets for low level data communication
body: <p>I am trying to understand the difference between WebRTC and WebSockets so that I can better understand which scenario calls for what.  I am curious about the broad idea of two parties (mainly web based, but potentially one being a dedicated server application) talking to each other.</p>
  
  <p>Assumption:</p>
  
  <ul>
  <li>Clearly in regards to ad-hoc networks, WebRTC wins as it natively supports the ICE protocol/method.</li>
  </ul>
  
  <p>Questions:</p>
  
  <ul>
  <li>Regarding direct communication between two known parties in-browser, if I am not relying on sending multimedia data, and I am only interested in sending integer data, does WebRTC give me any advantages over webSockets other than data encryption?</li>
  <li>Regarding a dedicated server speaking to a browser based client, which platform gives me an advantage?  I would need to code a WebRTC server (is this possible out of browser?), or I would need to code a WebSocket server (a quick google search makes me think this is possible).</li>
  </ul>