public abstract class HttpSessionClient : TcpSessionClientBase,
IHttpSessionClient, IHttpSession, ITcpSession, IClient, IDependencyObject,
IDisposableObject, IDisposable, ILoggerObject, IResolverConfigObject, IConfigObject,
IPluginObject, IResolverObject, IOnlineClient, IClosableClient, ISessionClient,
IIdClient, ITcpListenableClient
Public MustInherit Class HttpSessionClient
Inherits TcpSessionClientBase
Implements IHttpSessionClient, IHttpSession, ITcpSession, IClient,
IDependencyObject, IDisposableObject, IDisposable, ILoggerObject, IResolverConfigObject,
IConfigObject, IPluginObject, IResolverObject, IOnlineClient, IClosableClient,
ISessionClient, IIdClient, ITcpListenableClient
[<AbstractClassAttribute>]
type HttpSessionClient =
class
inherit TcpSessionClientBase
interface IHttpSessionClient
interface IHttpSession
interface ITcpSession
interface IClient
interface IDependencyObject
interface IDisposableObject
interface IDisposable
interface ILoggerObject
interface IResolverConfigObject
interface IConfigObject
interface IPluginObject
interface IResolverObject
interface IOnlineClient
interface IClosableClient
interface ISessionClient
interface IIdClient
interface ITcpListenableClient
end
HttpSessionClient | 构造函数 |
Config |
配置项
(继承自 TcpSessionClientBase。) |
DataHandlingAdapter |
数据处理适配器
(继承自 TcpSessionClientBase。) |
DisposedValue |
标识该对象是否已被释放
(继承自 DisposableObject。) |
Id |
用于索引的Id
(继承自 TcpSessionClientBase。) |
IP |
IP地址
(继承自 TcpSessionClientBase。) |
IsClient |
表示是否为客户端终端。当为时,表示是客户端。否则为服务器通讯终端。
(继承自 TcpSessionClientBase。) |
LastReceivedTime |
最后一次接收到数据的时间
(继承自 TcpSessionClientBase。) |
LastSentTime |
最后一次发送数据的时间
(继承自 TcpSessionClientBase。) |
ListenOption |
监听配置。
注意:一般情况下不要随意修改该值。 (继承自 TcpSessionClientBase。) |
Logger |
日志记录器
(继承自 ConfigObject。) |
MainSocket |
主通信器
(继承自 TcpSessionClientBase。) |
Online |
判断是否在线
(继承自 TcpSessionClientBase。) |
PluginManager |
插件管理器
(继承自 TcpSessionClientBase。) |
Port |
端口号
(继承自 TcpSessionClientBase。) |
Protocol |
终端协议
(继承自 TcpSessionClientBase。) |
Resolver |
获取解析器实例。
(继承自 TcpSessionClientBase。) |
Service |
包含此辅助类的主服务器类
(继承自 TcpSessionClientBase。) |
ServiceIP |
接收此客户端的服务器IP地址
(继承自 TcpSessionClientBase。) |
ServicePort |
接收此客户端的服务器端口
(继承自 TcpSessionClientBase。) |
UseSsl |
使用Ssl加密
(继承自 TcpSessionClientBase。) |
WebSocket | 当该连接是WebSocket时,可获取该对象,否则为null。 |
Abort |
中止当前操作。
(继承自 TcpSessionClientBase。) |
CloneTo |
将当前对象的依赖项克隆到目标对象中
(继承自 DependencyObject。) |
CloseAsync |
关闭客户端。
(继承自 TcpSessionClientBase。) |
Dispose |
释放资源。内部已经处理了SuppressFinalize(Object) (继承自 DisposableObject。) |
Dispose(Boolean) |
处置资源
(重写 TcpSessionClientBaseDispose(Boolean)) |
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。) |
GetHashCode | Serves as the default hash function. (继承自 Object。) |
GetType | Gets the Type of the current instance. (继承自 Object。) |
GetValueTValue |
获取依赖注入的值,当没有注入时,会返回默认行为的值。
(继承自 DependencyObject。) |
HasValueTValue |
判断在当前对象中是否有已设置的属性值。
(继承自 DependencyObject。) |
IdChanged |
当Id更新的时候触发
(继承自 TcpSessionClientBase。) |
MemberwiseClone | Creates a shallow copy of the current Object. (继承自 Object。) |
OnInitialized |
当初始化完成时,执行在OnTcpConnecting(ConnectingEventArgs)之前。
(继承自 TcpSessionClientBase。) |
OnReceivedHttpRequest | 当收到到Http请求时。覆盖父类方法将不会触发插件。 |
OnTcpClosed |
客户端已断开连接。
覆盖父类方法,将不会触发ITcpClosedPlugin插件。 (重写 TcpSessionClientBaseOnTcpClosed(ClosedEventArgs)) |
OnTcpClosing |
即将断开连接(仅主动断开时有效)。
覆盖父类方法,将不会触发ITcpClosingPlugin插件。 (继承自 TcpSessionClientBase。) |
OnTcpConnected |
当客户端完整建立Tcp连接时触发。
覆盖父类方法,将不会触发ITcpConnectedPlugin插件。 (继承自 TcpSessionClientBase。) |
OnTcpConnecting |
客户端正在连接。
覆盖父类方法,将不会触发ITcpConnectingPlugin插件。 (重写 TcpSessionClientBaseOnTcpConnecting(ConnectingEventArgs)) |
OnTcpReceived |
当收到适配器处理的数据时。
(重写 TcpSessionClientBaseOnTcpReceived(ReceivedDataEventArgs)) |
OnTcpReceiving |
当收到原始数据
(继承自 TcpSessionClientBase。) |
OnTcpSending |
在数据即将通过TCP发送时触发,此方法用于通过插件机制拦截发送行为。
如果子类覆盖了此方法,则不会触发插件。
(继承自 TcpSessionClientBase。) |
OnWebSocketClosed | 虚拟异步方法:处理WebSocket关闭事件 |
OnWebSocketClosing | 调用前触发WebSocket关闭时的插件 |
OnWebSocketHandshaked | 当WebSocket握手成功时,触发相关插件的异步事件。 |
OnWebSocketHandshaking | 在WebSocket握手过程中触发插件执行异步任务 |
OnWebSocketReceived | 虚拟异步方法:当WebSocket接收到数据时触发 |
ProtectedClearReceiver |
清除接收器对象。
(继承自 TcpSessionClientBase。) |
ProtectedCreateReceiver |
创建或获取接收器对象。
(继承自 TcpSessionClientBase。) |
ProtectedDefaultSendAsync |
异步发送数据,保护方法。
此方法用于在已建立的TCP连接上异步发送数据。
它首先检查当前实例是否已被处置,然后检查客户端是否已连接。
如果这些检查通过,它将调用OnTcpSending事件处理程序进行预发送处理,
最后通过TCP核心组件实际发送数据。
(继承自 TcpSessionClientBase。) |
ProtectedResetIdAsync |
直接重置内部Id。
(继承自 TcpSessionClientBase。) |
ProtectedSendAsync(IListArraySegmentByte) |
异步发送字节传输列表。
(继承自 TcpSessionClientBase。) |
ProtectedSendAsync(IRequestInfo) |
异步发送请求信息。
(继承自 TcpSessionClientBase。) |
ProtectedSendAsync(ReadOnlyMemoryByte) |
异步发送只读内存数据。
(继承自 TcpSessionClientBase。) |
ProtectedTryGetClient |
尝试通过Id获得对应的客户端
(继承自 TcpSessionClientBase。) |
RemoveValueTValue |
移除属性值。
(继承自 DependencyObject。) |
ResetIdAsync |
重新设置Id
(继承自 TcpSessionClientBase。) |
SetAdapter |
设置数据处理适配器。
(继承自 TcpSessionClientBase。) |
SetValueTValue |
设置依赖注入的值,如果值已经存在,将被覆盖。
(继承自 DependencyObject。) |
SwitchProtocolToWebSocketAsync | 转化Protocol协议标识为WebSocket |
ThrowIfConfigIsNull |
如果Config为空,则抛出ArgumentNullException的异常。
(继承自 ConfigObject。) |
ThrowIfDisposed |
判断当前对象是否已经被释放。
如果已经被释放,则抛出ObjectDisposedException异常。
(继承自 DisposableObject。) |
ToString | Returns a string that represents the current object. (继承自 Object。) |
TryGetValueTValue |
尝试获取依赖注入的值,当没有注入时,会返回。
(继承自 DependencyObject。) |
TryRemoveValueTValue |
尝试重置属性值,如果没有这个值,则返回。
(继承自 DependencyObject。) |
CloseWithTLV |
使用TLV格式关闭TCP会话
(由 TLVClientExtensions 定义。) |
CloseWithTLVAsync |
发送TLV的Close报文,然后关闭当前客户端
(由 TLVClientExtensions 定义。) |
GetJsonRpcActionClient |
获取基于Tcp协议或者WebSocket协议的双工JsonRpc端
(由 JsonRpcClientExtension 定义。) |
Map | (由 Mapper 定义。) |
Map | (由 Mapper 定义。) |
MapTTarget | (由 Mapper 定义。) |
PingWithTLV |
发送Tag为Ping的报文,然后等待Pong回应。
当适配器不是TLVDataHandlingAdapter时,会抛出异常。 (由 TLVClientExtensions 定义。) |
SafeDispose |
安全性释放(不用判断对象是否为空)。不会抛出任何异常。
内部会判断DisposedValue的值,如果为,则不会再执行Dispose。 (由 SystemExtension 定义。) |
SafeDispose |
安全性释放(不用判断对象是否为空)。不会抛出任何异常。
(由 SystemExtension 定义。) |
ToJsonString |
转换为Json
(由 SerializeConvert 定义。) |