title: Create a client websocket based console app
body: <p>At the moment I am using REST to consume data from external services/servers using my console app, but it's not very real time.</p>
  <p>Can anyone provide a very basic working example of how I can connect a .net core console app to <code>wss://echo.websocket.org</code>?</p>
  <p>I have started with:</p>
  <pre><code>using System;
  using System.Net.WebSockets;
  
  namespace websocket
  {
      class Program
      {
          static void Main(string[] args)
          {
  
              using (var ws = new WebSocket(&quot;wss://echo.websocket.org&quot;))
              {
  
              }
  
          }
      }
  }
  </code></pre>
  <p>But <code>new WebSocket(&quot;wss://echo.websocket.org&quot;))</code> shows the error <code>Cannot create an instance of the abstract type or interface 'WebSocket' [websocket]csharp(CS0144)</code></p>