static void Main(string[] args) { if( args.Length == 0) { Console.WriteLine("specify config as argument."); Console.ReadKey(); return; } UploaderConfig config = new UploaderConfig(args[0]); XSocketClient client = new XSocketClient(config.Url, "*"); client.OnOpen += client_OnOpen; client.OnError += client_OnError; client.OnClose += client_OnClose; client.OnMessage += client_OnMessage; client.Open(); //z nejakeho dovdotu nedostanu udalost OnOpen, ale nemohu hned posilat, pripojeni chviku trva Thread.Sleep(1000); Notifier notifier = new Notifier(config, client); notifier.RunAsync(); Console.WriteLine("Press any key to close..."); Console.ReadKey(); }
public Notifier(UploaderConfig config, XSocketClient client) { _config = config; _client = client; }