Add Multiple transports system, begin work on WebSockets

This commit is contained in:
Li 2022-11-16 01:59:32 +13:00
parent e869a23463
commit e74f66a439
22 changed files with 3752 additions and 3301 deletions

View file

@ -0,0 +1,16 @@
using System;
using System.Net.Sockets;
namespace HISP.Server.Network
{
public interface ITransport
{
public string Name { get; }
public bool Disconnected { get; }
public string Ip { get; }
public void Accept(Socket socket, Action<byte[]> onReceive, Action onDisconnect);
public void Send(byte[] data);
public void Disconnect();
}
}