title: Calling a server method that is outside of the Hub class from the client in SignalR
body: <p>Consider the class below:</p>
  
  <pre><code>using Microsoft.AspNet.SignalR;
  public class TwitterStream
      {
          // Hub Context
          IHubContext context = GlobalHost.ConnectionManager.GetHubContext&lt;GeoFeedHub&gt;();
  
          public void ChangeStreamBounds(double latitude, double longitude)
          {
              Debug.WriteLine(latitude + "-" + longitude);
          }
  
          // Lots of other interesting code redacted
     }
  </code></pre>
  
  <p>Is it possible to call the <code>ChangeStreamBounds</code> method from the client even though it is outside of the Hub class? It's possible to call client functions from the server (and from outside of the Hub class) but is it possible to do it the other way round?</p>
  
  <p>Unfortunately I've backed myself into a bit of a corner and the code must be executed from the class that I've written (not from the Hub itself - unless of course you can run a SignalR Hub as a Task factory)</p>