|
|
@ -31,7 +31,8 @@ namespace TestApp
|
|
|
|
StoreConnection("mytest", new IPEndPoint(IPAddress.Loopback, 8800));
|
|
|
|
StoreConnection("mytest", new IPEndPoint(IPAddress.Loopback, 8800));
|
|
|
|
StoreConnection("mymeta", new IPEndPoint(IPAddress.Loopback, 8801));
|
|
|
|
StoreConnection("mymeta", new IPEndPoint(IPAddress.Loopback, 8801));
|
|
|
|
|
|
|
|
|
|
|
|
Sheduller.RemindEvery(TimeSpan.FromSeconds(1), () =>
|
|
|
|
int count = 0;
|
|
|
|
|
|
|
|
Sheduller.RemindWhile(TimeSpan.FromSeconds(1), () =>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var client = ConnectToService("mytest");
|
|
|
|
var client = ConnectToService("mytest");
|
|
|
|
client.Send("pum");
|
|
|
|
client.Send("pum");
|
|
|
@ -42,6 +43,8 @@ namespace TestApp
|
|
|
|
s => Log.Info($"Response: {s}"));
|
|
|
|
s => Log.Info($"Response: {s}"));
|
|
|
|
client.Request<string>("now", s => Log.Info($"Response date: {s}"));
|
|
|
|
client.Request<string>("now", s => Log.Info($"Response date: {s}"));
|
|
|
|
client.Request<string>(BaseSocket.DEFAULT_REQUEST_WITHOUT_ARGS_INBOX, s => Log.Info($"Response ip: {s}"));
|
|
|
|
client.Request<string>(BaseSocket.DEFAULT_REQUEST_WITHOUT_ARGS_INBOX, s => Log.Info($"Response ip: {s}"));
|
|
|
|
|
|
|
|
count++;
|
|
|
|
|
|
|
|
return count > 3;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
Sheduller.RemindEvery(TimeSpan.FromSeconds(3), () =>
|
|
|
|
Sheduller.RemindEvery(TimeSpan.FromSeconds(3), () =>
|
|
|
|