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.
32 lines
1.0 KiB
32 lines
1.0 KiB
using System;
|
|
using System.Net;
|
|
|
|
namespace ZeroLevel.Network
|
|
{
|
|
public interface IExService
|
|
: IDisposable
|
|
{
|
|
IPEndPoint Endpoint { get; }
|
|
event Action<IZBackward> OnConnect;
|
|
event Action<IZBackward> OnDisconnect;
|
|
|
|
void RegisterInbox<T>(string inbox, Action<T, long, IZBackward> handler);
|
|
|
|
void RegisterInbox(string inbox, Action<long, IZBackward> handler);
|
|
|
|
void RegisterInbox<Treq, Tresp>(string inbox, Func<Treq, long, IZBackward, Tresp> handler);
|
|
|
|
/// <summary>
|
|
/// Replier without request
|
|
/// </summary>
|
|
void RegisterInbox<Tresp>(string inbox, Func<long, IZBackward, Tresp> handler);
|
|
|
|
/*
|
|
DEFAULT INBOXES
|
|
*/
|
|
void RegisterInbox(Action<long, IZBackward> handler);
|
|
void RegisterInbox<T>(Action<T, long, IZBackward> handler);
|
|
void RegisterInbox<Treq, Tresp>(Func<Treq, long, IZBackward, Tresp> handler);
|
|
void RegisterInbox<Tresp>(Func<long, IZBackward, Tresp> handler);
|
|
}
|
|
} |