77 lines
1.8 KiB
C#
77 lines
1.8 KiB
C#
namespace BF
|
||
{
|
||
public enum NetConnectStatus
|
||
{
|
||
/// <summary>
|
||
/// Connect 和 Channel 尚未创建
|
||
/// </summary>
|
||
InvalidConnect,
|
||
|
||
/// <summary>
|
||
/// Connect 和 Channel 已创建,但未连接
|
||
/// </summary>
|
||
Unconnected,
|
||
|
||
/// <summary>
|
||
/// 创建socket,调用socket 开始连接
|
||
/// </summary>
|
||
Connecting,
|
||
|
||
/// <summary>
|
||
/// socket连接成功,开始等待服务器回包,进行密钥交换
|
||
/// </summary>
|
||
VerifyConnecting,
|
||
|
||
/// <summary>
|
||
/// 如果是重连上下文,完成的VerifyConnecting,和服务器进行重连消息交互;完成后,进入Connected
|
||
/// </summary>
|
||
Reconnecting,
|
||
|
||
/// <summary>
|
||
/// 连接创建已经完成,可以发送/接受应用消息
|
||
/// </summary>
|
||
Connected,
|
||
|
||
/// <summary>
|
||
/// 正在断开连接,暂未使用
|
||
/// </summary>
|
||
Disconnecting,
|
||
|
||
/// <summary>
|
||
/// 连接已断开
|
||
/// </summary>
|
||
Disconnected,
|
||
/// <summary>
|
||
/// 账号认证
|
||
/// </summary>
|
||
Authing,
|
||
/// <summary>
|
||
/// 账号认证失败
|
||
/// </summary>
|
||
Unauthorized,
|
||
Decoding,
|
||
Decoding2,
|
||
|
||
}
|
||
|
||
/// <summary>
|
||
/// 连接上下文:用于区分连接流程,是 新建连接 或 重连
|
||
/// </summary>
|
||
internal enum NetConnectContext
|
||
{
|
||
/// <summary>
|
||
/// 无效上下文
|
||
/// </summary>
|
||
Invalid,
|
||
|
||
/// <summary>
|
||
/// 新建连接 或 重连完成 上下文,
|
||
/// </summary>
|
||
NewConnect,
|
||
|
||
/// <summary>
|
||
/// 重连上下文
|
||
/// </summary>
|
||
Reconnect,
|
||
}
|
||
} |