mirror of
https://github.com/snltty/linker.git
synced 2025-10-06 01:26:54 +08:00
代理的DNAT和webapi
This commit is contained in:
27
src/linker.libs/web/IWebApiServer.cs
Normal file
27
src/linker.libs/web/IWebApiServer.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace linker.libs.web
|
||||
{
|
||||
/// <summary>
|
||||
/// web服务
|
||||
/// </summary>
|
||||
public interface IWebApiServer
|
||||
{
|
||||
/// <summary>
|
||||
/// 开始
|
||||
/// </summary>
|
||||
public void Start(int port);
|
||||
|
||||
public void AddController(IWebApiController controller);
|
||||
public void AddControllers(List<IWebApiController> controllers);
|
||||
}
|
||||
|
||||
public interface IWebApiController
|
||||
{
|
||||
public string Path { get; }
|
||||
public Memory<byte> Handle(string query);
|
||||
public void Free();
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user