static void Main(string[] args) { ServerList serverList = new ServerList(); var servers = serverList.Refresh(); servers.Wait(); foreach (Server server in servers.Result) { Console.WriteLine(server.Name); } var pings = serverList.Ping(servers.Result.Select(s => s.Address)); pings.Wait(); foreach (PingResult result in pings.Result) { if (result == null) { continue; } Console.WriteLine("{0}: {1}", result.Reply.Status, result.Address); } IClient ircClient = new Client(); IClientConnection connection = ircClient.CreateClientConnection("irc.freenode.net", 6666, null); connection.Connect().Wait(); connection.Login("Harvester", "Harvester", "Harvester").Wait(); connection.Join("#tz"); Console.ReadKey(); }
public async Task StartApp() { // Register these two objects for change tranmsission _receiver.ProxyChangesToInstance(_data.MeetingState); _receiver.ProxyChangesToInstance(_data.Person); _receiver.ProxyChangesToInstance(_data.AnnotationsModel); await _connection.Connect(); }
public static void Main(String[] args) { bool run = true; IClient client = new ReactiveIRC.Client.Client(); IClientConnection connection = client.CreateClientConnection(args[0], Convert.ToUInt16(args[1]), null); connection.ReceivedMessages.Subscribe(PrintMessage); connection.Connect().Subscribe( _ => {}, e => _logger.ErrorException("Error connecting.", e), () => connection.Login(args[2], args[3], args[4], args[5]).Subscribe() ); Console.CancelKeyPress += delegate { connection.Dispose(); run = false; }; while (run) { Thread.Sleep(50); } }