chore
parent
c358fd4de9
commit
4f38ce0615
|
@ -52,9 +52,6 @@
|
||||||
<Compile Include="..\Realtime\Internal\Controller\LCIMConversationController.cs">
|
<Compile Include="..\Realtime\Internal\Controller\LCIMConversationController.cs">
|
||||||
<Link>Internal\Controller\LCIMConversationController.cs</Link>
|
<Link>Internal\Controller\LCIMConversationController.cs</Link>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="..\Realtime\Internal\Controller\LCIMGoAwayController.cs">
|
|
||||||
<Link>Internal\Controller\LCIMGoAwayController.cs</Link>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="..\Realtime\Internal\Router\LCRTMServer.cs">
|
<Compile Include="..\Realtime\Internal\Router\LCRTMServer.cs">
|
||||||
<Link>Internal\Router\LCRTMServer.cs</Link>
|
<Link>Internal\Router\LCRTMServer.cs</Link>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
|
|
@ -70,8 +70,10 @@ namespace LeanCloud.Realtime.Internal.Connection {
|
||||||
private LCWebSocketClient ws;
|
private LCWebSocketClient ws;
|
||||||
|
|
||||||
private State state;
|
private State state;
|
||||||
|
// 可以在 connecting 状态时拿到 Task,并在重连成功后继续操作
|
||||||
private Task connectTask;
|
private Task connectTask;
|
||||||
|
|
||||||
|
// 共享这条连接的 IM Client
|
||||||
private readonly Dictionary<string, LCIMClient> idToClients;
|
private readonly Dictionary<string, LCIMClient> idToClients;
|
||||||
|
|
||||||
internal LCConnection(string id) {
|
internal LCConnection(string id) {
|
||||||
|
@ -193,8 +195,10 @@ namespace LeanCloud.Realtime.Internal.Connection {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (command.Cmd == CommandType.Echo) {
|
if (command.Cmd == CommandType.Echo) {
|
||||||
|
// 心跳应答
|
||||||
heartBeat.Pong();
|
heartBeat.Pong();
|
||||||
} else if (command.Cmd == CommandType.Goaway) {
|
} else if (command.Cmd == CommandType.Goaway) {
|
||||||
|
// 针对连接的消息
|
||||||
Reset();
|
Reset();
|
||||||
} else {
|
} else {
|
||||||
// 通知
|
// 通知
|
||||||
|
|
Loading…
Reference in New Issue