Exemple #1
0
        public void Start()
        {
            var server = new Server(_listenToUrl);

            server.MapHubs();
            server.Start();
            Console.WriteLine("SignalR Server started at " + _listenToUrl);

            SingletonDDPClient.Connect(_meteorServerUrl, _dataSubscriber);
            Console.WriteLine("Connected to Meteor server at " + _meteorServerUrl);
        }
Exemple #2
0
 /// <summary>
 /// Call this function from the client if both the Meteor.Collection name and the publish name is different.
 /// For eg. Products =  new Meteor.Collection("product");
 ///     Meteor.publish("allProducts", function(){
 ///            return Products.find();
 ///        });
 /// In the above scenario collection name is product and the publish name is allProducts.
 /// </summary>
 /// <param name="subscriptionName"></param>
 /// <param name="collectionName"></param>
 public void Subscribe(string subscriptionName, string collectionName)
 {
     Groups.Add(Context.ConnectionId, collectionName);
     SingletonDDPClient.Subscribe(subscriptionName);
     Console.WriteLine("Subscribed to " + subscriptionName);
 }