Improve command system, add HELP command,

This commit is contained in:
Li 2022-11-26 22:57:46 +13:00
parent a2782fd35e
commit 9e69492e46
39 changed files with 1865 additions and 1620 deletions

View file

@ -0,0 +1,55 @@
// A transport that does absolutely nothing.
// only use this for testing.
using System;
using System.Net;
using System.Net.Sockets;
namespace HISP.Server.Network
{
public class NullSocket : ITransport
{
private bool disconnected = false;
public string Name
{
get
{
return "NullSocket";
}
}
public bool Disconnected
{
get
{
return disconnected;
}
set
{
disconnected = value;
}
}
public string Ip
{
get
{
return IPAddress.Loopback.MapToIPv4().ToString();
}
}
public void Accept(Socket socket, Action<byte[]> onReceive, Action onDisconnect)
{
return;
}
public void Disconnect()
{
disconnected = true;
return;
}
public void Send(byte[] data)
{
return;
}
}
}