Closed veryitman closed 4 years ago
发送群消息一直在 loading, 对方也无法收到消息.
(BOOL)sendGroupMessage:(IMMessage )im { Message m = [[Message alloc] init]; m.cmd = MSG_GROUP_IM; m.body = im; BOOL r = [self sendMessage:m];
if (!r) return r; [self.groupMessages setObject:im forKey:[NSNumber numberWithInt:m.seq]];
//在发送需要回执的消息时尽快发现socket已经断开的情况 [self ping];
return r; }
看到 [self sendMessage:m] 返回是成功的.
[self sendMessage:m]
要确保群组id, 以及发送者要在这个群内
发送群消息一直在 loading, 对方也无法收到消息.
(BOOL)sendGroupMessage:(IMMessage )im { Message m = [[Message alloc] init]; m.cmd = MSG_GROUP_IM; m.body = im; BOOL r = [self sendMessage:m];
if (!r) return r; [self.groupMessages setObject:im forKey:[NSNumber numberWithInt:m.seq]];
//在发送需要回执的消息时尽快发现socket已经断开的情况 [self ping];
return r; }
看到
[self sendMessage:m]
返回是成功的.