mirror of https://github.com/ogoun/Zero.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
701 B
31 lines
701 B
using System;
|
|
using System.Net;
|
|
using ZeroLevel;
|
|
using ZeroLevel.Services.Applications;
|
|
|
|
namespace TestApp
|
|
{
|
|
public class MyService
|
|
: BaseZeroService
|
|
{
|
|
public MyService()
|
|
:base()
|
|
{
|
|
}
|
|
|
|
protected override void StartAction()
|
|
{
|
|
Log.Info("Started");
|
|
Sheduller.RemindEvery(TimeSpan.FromSeconds(5), () => {
|
|
var client = ConnectToService(new IPEndPoint(IPAddress.Loopback, 8800));
|
|
client.Request<string, string>("upper", "hello", s => Log.Info(s));
|
|
});
|
|
}
|
|
|
|
protected override void StopAction()
|
|
{
|
|
Log.Info("Stopped");
|
|
}
|
|
}
|
|
}
|