点击或拖拽改变大小

HttpServer 方法

HttpServer 类型公开以下成员。

方法
  名称说明
公共方法Close
关闭服务器
Shut down the server
公共方法Equals
Determines whether the specified object is equal to the current object.
(继承自 Object。)
受保护的方法Finalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(继承自 Object。)
公共方法GetAllRpcApiInfo
获取当前所有注册的RPC接口信息,将返回一个数据列表。
Get all currently registered RPC interface information, and a data list will be returned.
公共方法GetHashCode
Serves as the default hash function.
(继承自 Object。)
公共方法静态成员GetMethodName
根据完整的地址获取当前的url地址信息
公共方法GetType
Gets the Type of the current instance.
(继承自 Object。)
公共方法静态成员HandleObjectMethod(HttpListenerRequest, String, String, MqttRpcApiInfo, ActionHttpListenerRequest, ISessionContext)
使用指定的对象来返回网络的API接口,前提是传入的数据为json参数,返回的数据为json数据,详细参照说明
Use the specified object to return the API interface of the network, provided that the incoming data is json parameters and the returned data is json data, please refer to the description for details
公共方法静态成员HandleObjectMethod(HttpListenerRequest, String, String, Object, ActionHttpListenerRequest, ISessionContext)
使用指定的对象来返回网络的API接口,前提是传入的数据为json参数,返回的数据为json数据,详细参照说明
Use the specified object to return the API interface of the network, provided that the incoming data is json parameters and the returned data is json data, please refer to the description for details
受保护的方法HandleRequest
根据客户端的请求进行处理的核心方法,可以返回自定义的数据内容,只需要集成重写即可。
The core method of processing according to the client's request can return custom data content, and only needs to be integrated and rewritten.
受保护的方法MemberwiseClone
Creates a shallow copy of the current Object.
(继承自 Object。)
公共方法RegisterHttpRpcApi(Object)
注册一个RPC的服务接口,可以指定当前的控制器名称,以及提供RPC服务的原始对象
Register an RPC service interface, you can specify the current controller name, and the original object that provides the RPC service
公共方法RegisterHttpRpcApi(String, Object)
注册一个RPC的服务接口,可以指定当前的控制器名称,以及提供RPC服务的原始对象
Register an RPC service interface, you can specify the current controller name, and the original object that provides the RPC service
公共方法SetLoginAccessControl
设置登录的账户信息,如果需要自己控制,可以自己实现委托HandleRequestFunc
Set the login account information, if you need to control by yourself, you can implement the delegation by yourselfHandleRequestFunc
公共方法Start
启动服务器,正常调用该方法时,应该使用try...catch...来捕获错误信息
Start the server and use try...catch... to capture the error message when calling this method normally
公共方法ToString
Returns a string that represents the current object.
(重写 ObjectToString.)
公共方法UnRegisterHttpRpcApi(Object)
卸载一个已经注册的RPC接口,想要卸载指定的接口,此处就需要传入注册时一样的参数
Uninstall a registered RPC interface. If you want to uninstall the specified interface, you need to pass in the same parameters as the registration
公共方法UnRegisterHttpRpcApi(String, Object)
卸载一个已经注册的RPC接口,想要卸载指定的接口,此处就需要传入注册时一样的参数
Uninstall a registered RPC interface. If you want to uninstall the specified interface, you need to pass in the same parameters as the registration
公共方法UseHttps
使用HTTPS模式,关于如何使用证书,具体的教程可以参考:http://www.hsltechnology.cn/Doc/HslCommunication?chapter=HslCommChapter6-5
For more information about how to use the certificate in the HTTPS mode, please refer to http://www.hsltechnology.cn/Doc/HslCommunication?chapter=HslCommChapter6-5
Top
扩展方法
  名称说明
公共扩展器方法ToJsonString
获取当前对象的JSON格式表示的字符串。
Gets the string represented by the JSON format of the current object.
(由 HslExtension 定义。)
Top
参见