Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Net;
- using Communication.Global;
- using Communication.Matrix;
- using Communication.Messaging;
- using Communication.Messaging.Model;
- using DotNetty.Transport.Channels;
- using Matrix;
- using Matrix.Network;
- using Matrix.Network.Resolver;
- using Matrix.Sasl;
- using Matrix.Srv;
- using Matrix.Xml;
- namespace TestApp
- {
- class Program
- {
- static void Main(string[] args)
- {
- // var im = new InstantMessenger
- // {
- var user = new XmppUser()
- {
- NickName = "WPF 1.0_77780f8f-7575-4700-be16-af021e713460",
- Password = "6)Bpg|D+8GfWaa^};!52u&KtwC!>69E]",
- Server = "qaim.dataonix.com",
- User = "77780f8f-7575-4700-be16-af021e713460",
- Resource = null,
- };
- // };
- // im.Login();
- // var srv = new MyMatrixService();
- // srv.Connect("im-nonprod.dataonix.com", user);
- var xmpp = new XmppClient()
- {
- // Compression = true,
- // CertificateValidator = new AlwaysAcceptCertificateValidator(),
- // HostnameResolver = new SrvNameResolver(),
- // HostnameResolver = new StaticNameResolver("im-nonprod.dataonix.com", directTls: true, port: 5223),
- HostnameResolver = new StaticNameResolver("im-nonprod.dataonix.com", port: 5232),
- Resource = IMSettings.RESOURCE,
- // Port = 1234,
- // Port = 5233,
- // Port = 5232,
- Password = "6)Bpg|D+8GfWaa^};!52u&KtwC!>69E]",
- Username = "77780f8f-7575-4700-be16-af021e713460",
- XmppDomain = "qaim.dataonix.com",
- // SaslHandler = new DefaultSaslHandler() { },
- // Tls = true,
- // TlsHandlerProvider = new DefaultClientTlsHandlerProvider(),
- // RegistrationHandler = null,
- // TlsSettingsProvider = new DefaultClientTlsSettingsProvider(),
- };
- // var task1 = xmpp.HostnameResolver.ResolveAsync(new DnsEndPoint("im-nonprod.dataonix.com", xmpp.Port));
- // task1.Wait(5000);
- var task = xmpp.ConnectAsync();
- task.Wait(10000);
- //Console.WriteLine(task.Exception);
- Console.WriteLine(task.Result);
- Console.WriteLine("Hello World!");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement