title: Using RxJS 6.x WebSocketSubject client
body: <p>I cannot figure out how to use WebSocketSubjects in rxjs <code>v6.x</code></p>
  
  <p>Here's the working HTML/JS for <code>v5.5.6</code>. The commented out code is my attempt at getting it working in <code>v6.x</code>:</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;html&gt;
  &lt;head&gt;
      &lt;!-- &lt;script src="https://unpkg.com/@reactivex/rxjs@6.0.0/dist/global/rxjs.umd.js"&gt;&lt;/script&gt; --&gt;
      &lt;script src="https://unpkg.com/@reactivex/rxjs@5.5.6/dist/global/Rx.js"&gt;&lt;/script&gt;
      &lt;script&gt;
          // const { WebSocketSubject } = rxjs.webSocket;
          // const socket$ = WebSocketSubject.create('ws://localhost:8080');
          const socket$ = Rx.Observable.webSocket('ws://localhost:8080');
          socket$.subscribe(
                  (data) =&gt; console.log(data),
                  (err) =&gt; console.error(err),
                  () =&gt; console.warn('Completed!')
              );
          socket$.next(JSON.stringify({
              event: 'events',
              data: 'test',
          }));
          console.log('here')
      &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;&lt;/body&gt;
  &lt;/html&gt;
  </code></pre>