title: C# - TLS / SSL Websockets using fleck
body: <p>Im trying to make a TLS/SSL websocket connection using Fleck lib.</p>
  
  <blockquote>
    <p><a href="https://github.com/statianzo/Fleck" rel="nofollow">https://github.com/statianzo/Fleck</a>  (0.9.8.25)</p>
  </blockquote>
  
  <p>now i got the server startet .<br>
  but when a client connects  i get the following message.</p>
  
  <blockquote>
  <pre><code>28-02-2014 19:16:15 [Info] Server started at wss://localhost:8081
  28-02-2014 19:18:51 [Debug] Client connected from 127.0.0.1:62543
  28-02-2014 19:18:51 [Debug] Authenticating Secure Connection
  28-02-2014 19:18:52 [Debug] 0 bytes read. Closing.
  </code></pre>
  </blockquote>
  
  <p>anybody got an idea of what im doing wrong ? </p>
  
  <blockquote>
    <p>Browser: Chrome, version : 33.0.1750.117</p>
  </blockquote>
  
  <p>// sample code.</p>
  
  <pre><code>        FleckLog.Level = LogLevel.Debug;
  
          var allSockets = new List&lt;IWebSocketConnection&gt;();
  
          var server = new WebSocketServer("wss://localhost:8081");
  
          server.Certificate = new X509Certificate2(@"CRT.pfx", "Pwd");
  
          server.Start(socket =&gt;
          {
  
              socket.OnOpen = () =&gt;
              {
                  Console.WriteLine("Open!");
                  allSockets.Add(socket);
              };
              socket.OnClose = () =&gt;
              {
                  Console.WriteLine("Close!");
                  allSockets.Remove(socket);
              };
              socket.OnMessage = message =&gt;
              {
  
                  foreach (var user in allSockets.ToList())
                  {
                       if(user.ConnectionInfo.Id != socket.ConnectionInfo.Id){
                           user.Send(message);
                       }
                  }
  
              };
          });
  
  
          var input = Console.ReadLine();
  
          while (input != "exit")
          {
  
              foreach (var socket in allSockets.ToList())
              {
                  socket.Send(input);
              }
  
              input = Console.ReadLine();
          }
  </code></pre>