c1_unity/Assets/Scripts/Common/Network/NetConnectStatus.cs
2023-04-03 11:04:31 +08:00

77 lines
1.8 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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,
}
}