/// <summary> /// Constructor. Initializes hubconnection /// </summary> public GeoHub() { connection = new HubConnection(connectionUrl); hubProxy = connection.CreateHubProxy(hubName); connection.Start().Wait(); //hubProxy.Invoke("Send", "Info", "").Wait(); _hub = this; }
public static GeoHub GetGeoHub() { if(_hub == null) _hub = new GeoHub(); return _hub; }
public void TestGeoHub() { var hub = new GeoHub(); hub.SendMessage(new GeoIp() { description = "Test geo ip location", GeoIpId = 1337, Ip = "1.3.3.7", Lat = 53, Long = 4 }); Thread.Sleep(1); }