title: How to send data from web socket server to client?
body: <p>I started using <code>WebSocketSharp</code> to create a simple WebSocket Server. Everything works great with this simple code:</p>
  
  <pre><code>var service = new WebSocketCustomerImageService();
  
  var serverSocket = new WebSocketServer("ws://localhost:2000");
  serverSocket.AddWebSocketService&lt;WebSocketCustomerImageService&gt;("/customerImageService");
  serverSocket.Start();
  </code></pre>
  
  <p>Service class:</p>
  
  <pre><code>    public class WebSocketCustomerImageService : WebSocketBehavior
      {
          protected override void OnMessage(MessageEventArgs e)
          {
              Send("Hello from the other side!");
          }        
      }
  </code></pre>
  
  <p>This works great, the server responds when the client sends any message, but now, I want the server to send a message without the need of the client to send anything. The <code>Send()</code> method seems to only be available on the <code>WebSocketBehavior</code> class and I don't directly instanciate this <code>WebSocketCustomerImageService</code> class.</p>
  
  <p>How can access the created instance to use the <code>Send()</code> method or what's the proper way to achieve this?</p>