interface IServer
cangjie
public interface IServer功能:定义启动和停止 HTTP 服务器的能力。
成员概览
| 成员 | 功能 |
|---|---|
| func start(RequestDelegate) | 使用指定请求管道启动服务器。 |
| func stop() | 停止当前服务器。 |
func start(RequestDelegate)
cangjie
func start(pipeline: RequestDelegate): Unit功能:使用指定请求管道启动服务器。
参数:
- pipeline:
RequestDelegate- 用于处理请求的委托管道。
返回值:
Unit
func stop()
cangjie
func stop(): Unit功能:停止当前服务器。
返回值:
Unit