public void Initialize() { _theServer = new IrisServer(); _theServer.Start(56666); _theClientConfig = new IrisClientConfig() { Hostname = "127.0.0.1", Port = 56666 }; }
private static void PerfTest() { string channel = "perf"; IrisServer server = new IrisServer(); server.Start(22000); Console.WriteLine("Server started"); IrisLocalNode echoNode = new IrisLocalNode(); echoNode.Connect(server.GetServerConfig()); Console.WriteLine("Echo node connected"); echoNode.OnDisposed += () => { server.Stop(); }; System.Threading.Tasks.Task <IDisposableSubscription> asyncSubscription = null; asyncSubscription = echoNode.Subscribe(channel, (c, h) => { if (!h.Unsubscribing) { var echoMessage = $"ECHO: {c}"; echoNode.Publish(channel, echoMessage); if ((c as Test)?.Data == null && (c as Test)?.Message == null) { var sub = asyncSubscription.Result; sub.Dispose(); } } else { echoNode.Dispose(); } }); }
public void ServerIdAreUnique() { var otherServer = new IrisServer(); Assert.AreNotEqual(otherServer.Id, _theServer.Id); }
public void Initialize() { _theServer = new IrisServer(); }