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.
25 lines
755 B
25 lines
755 B
using System;
|
|
using System.Net;
|
|
|
|
namespace ZeroLevel.Network
|
|
{
|
|
public interface IClient
|
|
: IDisposable
|
|
{
|
|
IPEndPoint Endpoint { get; }
|
|
SocketClientStatus Status { get; }
|
|
IRouter Router { get; }
|
|
ISocketClient Socket { get; }
|
|
|
|
bool Send<T>(T message);
|
|
bool Send(string inbox);
|
|
bool Send(string inbox, byte[] data);
|
|
bool Send<T>(string inbox, T message);
|
|
|
|
bool Request(string inbox, Action<byte[]> callback);
|
|
bool Request(string inbox, byte[] data, Action<byte[]> callback);
|
|
bool Request<Tresponse>(string inbox, Action<Tresponse> callback);
|
|
bool Request<Trequest, Tresponse>(string inbox, Trequest request, Action<Tresponse> callback);
|
|
}
|
|
}
|