forked from project-redbud/FunGame-Core
Add CreateRoomException, ForceLogout and BaseMode.WaitForWorkDone() (#6)
This commit is contained in:
commit
84cbedf1f6
@ -82,5 +82,16 @@ namespace Milimoe.FunGame.Core.Library.Common.Architecture
|
|||||||
Working = true;
|
Working = true;
|
||||||
Work = default;
|
Work = default;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 调用Socket.Send() == Success后,请等待任务完成
|
||||||
|
/// </summary>
|
||||||
|
protected void WaitForWorkDone()
|
||||||
|
{
|
||||||
|
while (true)
|
||||||
|
{
|
||||||
|
if (!Working) break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -56,6 +56,7 @@
|
|||||||
Login,
|
Login,
|
||||||
CheckLogin,
|
CheckLogin,
|
||||||
Logout,
|
Logout,
|
||||||
|
ForceLogout,
|
||||||
Disconnect,
|
Disconnect,
|
||||||
HeartBeat,
|
HeartBeat,
|
||||||
IntoRoom,
|
IntoRoom,
|
||||||
|
|||||||
@ -150,8 +150,13 @@
|
|||||||
public override string Message => "退出房间失败 (#10030)";
|
public override string Message => "退出房间失败 (#10030)";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class CreateRoomException : Exception
|
||||||
|
{
|
||||||
|
public override string Message => "创建房间失败 (#10031)";
|
||||||
|
}
|
||||||
|
|
||||||
public class GetInstanceException : Exception
|
public class GetInstanceException : Exception
|
||||||
{
|
{
|
||||||
public override string Message => "构造对象实例遇到错误 (#10031)";
|
public override string Message => "构造对象实例遇到错误 (#10032)";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user