|
@@ -154,7 +154,8 @@ static webSocketManager *webSocketManagerInstance = nil;
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- if([model.data.msg isEqualToString:@"only one socket"]){
|
|
|
+ if([model.data.msg isEqualToString:@"only one socket"]||
|
|
|
+ [model.data.msg isEqualToString:@"only one socket2"]){
|
|
|
[weakSelf deleteCommandSendTaskFunWith:@"offline_notification"];
|
|
|
}
|
|
|
}
|
|
@@ -948,13 +949,27 @@ static webSocketManager *webSocketManagerInstance = nil;
|
|
|
[self send_data:commondStr];
|
|
|
}
|
|
|
|
|
|
+#pragma mark 告诉别的ws收到的挤下线消息
|
|
|
+- (void)didReceiveLogoutMsgFun
|
|
|
+{
|
|
|
+ NSString *curOaidStr = [RcGameWQKeyChain getOaidStringFun];
|
|
|
+ if(!curOaidStr){
|
|
|
+ curOaidStr = @"";
|
|
|
+ }
|
|
|
+ NSString *commondStr = [[NSString alloc] initWithFormat:@"{\"type\":\"forwardMsg\",\"data\":\"only one socket2\",\"sign\":\"%@\"}",curOaidStr];
|
|
|
+ //NSString *commondStr = @"{\"type\":\"forwardMsg\",\"data\":\"offline_notification\"}";
|
|
|
+ [self send_data:commondStr];
|
|
|
+}
|
|
|
+
|
|
|
#pragma mark 单点登录被挤下线弹框
|
|
|
- (void)LogoutByOtherFun
|
|
|
{
|
|
|
+
|
|
|
if(logoutAlertVC){
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+ [self didReceiveLogoutMsgFun];
|
|
|
|
|
|
//通知音视频断开链接
|
|
|
[[NSNotificationCenter defaultCenter] postNotificationName:logoutByOtherNotification object:nil];
|