sonyarouje / DDPClient.NET

A DDP client for .NET
83 stars 19 forks source link

Nothing happened ? #13

Open rakibulalam opened 7 years ago

rakibulalam commented 7 years ago

I try a lot to connect with meteor apps using this package. But there is no way to understand what about the connection is work or not. Even no error, no message. following my code:

[class MainClass { public static void Main(string[] args) { IDataSubscriber subscriber = new Subscriber(); DDPClient client = new DDPClient(subscriber);

        client.Connect("localhost:3000");
        // or if you want to connect over SSL
        // client.Connect("localhost:3000", true);
        // or if you prefer a more explicit approach
        // client.Connect("localhost:3000", useSsl: true);

        client.Subscribe("findproducts");

    }

    class Subscriber : IDataSubscriber
    {
        string IDataSubscriber.Session
        {
            get
            {
                throw new NotImplementedException();
            }

            set
            {
                throw new NotImplementedException();
            }
        }

        public void DataReceived(dynamic data)
        {
            Console.WriteLine(data);
                if (data.type == "subs")
                {
                    Console.WriteLine(data.prodCode + ": " + data.prodName + ": collection: " + data.collection);
                }

        }

        //void IDataSubscriber.DataReceived(dynamic data)
        //{
        //  Console.WriteLine(data);
        //  throw new NotImplementedException();
        //}
    }](url)

I realy upset after spending couple of hours. :( ++

FrancisBou commented 7 years ago

Did you ever find a solution for this, is this project useful at all?