Queue websocket requests until initialized / process queue
<p>I have a Angular2 websocket application that needs to complete a handshake on connection before I send any other messages.</p>

<p>My "widget" controller uses a "network" service that is a wrapper for websockets</p>

<pre><code>import { $WebSocket } from 'angular2-websocket/angular2-websocket';
</code></pre>

<p>the "widget's" ngOnit is sending a websocket message before the handshake has completed.</p>

<p>How do I ensure that the service queues up outgoing messages / "wait" for the init/handshake to complete before processing?</p>

<ul>
<li>RxJS (controlled observer, Subject)?  <em>(I'm not yet able to massage RxJS's secrets out of its documentation)</em> </li>
<li>promise?  </li>
<li>Something already built into Angular (such as deferring my controller's init until service has initialized)?</li>
</ul>

<p>I feel like I'm making this harder than it should be</p>