title: Django Channels Realtime API
body: <p>So, I am building an API with Django REST Framework for my React Native App. Now I want to implement a chat feature and I wanted to take <strong>Django Channels</strong> to build a realtime chat feature over a TCP Connection. Now I read I couldn't build a Realtime API with Django Channels. Does it mean, I can't use Django Channels on my Server and <strong>this</strong> in my React Native APP?:</p>
  <pre class="lang-js prettyprint-override"><code>var ws = new WebSocket('ws://host.com/path');
  
  ws.onopen = () =&gt; {
    // connection opened
    ws.send('something'); // send a message
  };
  
  ws.onmessage = (e) =&gt; {
    // a message was received
    console.log(e.data);
  };
  
  ws.onerror = (e) =&gt; {
    // an error occurred
    console.log(e.message);
  };
  
  ws.onclose = (e) =&gt; {
    // connection closed
    console.log(e.code, e.reason);
  };
  </code></pre>
  <p>I did unterstand it, like another version off a HTTP(S) connection or a kind of :)</p>