AnyChat技术支持论坛
标题: 用户登录和网络断开一直循环调用 [打印本页]
作者: 花花猪 时间: 2013-11-18 20:54
标题: 用户登录和网络断开一直循环调用
- (void) OnAnyChatLogin:(int) dwUserId : (int) dwErrorCode 和 - (void) OnAnyChatLinkClose:(int) dwErrorCode 不停地循环调用,导致我的发送消息一直失败,
[AnyChatPlatform TransBuffer:[friendId intValue] :data ] 返回值等于208,这是什么情况啊?
作者: 花花猪 时间: 2013-11-18 20:56
有人在么,求帮助啊!!
作者: admin 时间: 2013-11-18 21:03
您好,errorcode = 208,表示没有登录,调用api出错。
作者: admin 时间: 2013-11-18 21:12
另外,关于您反馈的一直登录、断开连接,请将日志信息贴上来我们分析一下,谢谢。
作者: 花花猪 时间: 2013-11-19 12:00
不好意思,昨天发完贴就走了!
作者: 花花猪 时间: 2013-11-19 12:02
---------------------------AnyChat Platform Core SDK Client Log---------------------------
[2013-11-19 11:47:38(956)] Load libanychatcore.so success!(V4.8 Build Time:Sep 23 2013 21:09:14)
[2013-11-19 11:47:38(957)] Load libmediautil.so success!(V4.8 Build Time:Sep 23 2013 21:09:36)
[2013-11-19 11:47:38(961)] Load libmediashow.so success!(V4.8 Build Time:Sep 23 2013 21:09:34)
[2013-11-19 11:47:38(962)] Load libmediacore.so success!(V4.8 Build Time:Sep 23 2013 21:09:30)
[2013-11-19 11:47:38(968)] Invoke BRAC_Connect(192.168.0.99,8906)=0
[2013-11-19 11:47:39(065)] CheckClientSocketLink Connect(ip=192.168.0.99,port=8906)
[2013-11-19 11:47:39(278)] Server version: V4.8(Build Time:2013-09-21 10:04:04, Server OS:Windows)
[2013-11-19 11:47:39(280)] Message OnConnect(bSuccess:1, errorcode=0)
[2013-11-19 11:47:39(580)] Invoke LoginServer(username=user|test)
[2013-11-19 11:47:39(800)] Message OnLoginSystem(userid=1,errorcode=0,username=�����ʺ�), msg deliver worked(0)
[2013-11-19 11:47:39(802)] Load libmediautil.so success!(V4.8 Build Time:Sep 23 2013 21:09:36)
[2013-11-19 11:47:39(803)] Load libmediashow.so success!(V4.8 Build Time:Sep 23 2013 21:09:34)
[2013-11-19 11:47:39(803)] Load libmediacore.so success!(V4.8 Build Time:Sep 23 2013 21:09:30)
[2013-11-19 11:47:39(823)] Connection to streaming media server successfully!(udp delay:9ms)
[2013-11-19 11:47:44(855)] socket error, disconnected by peer!, bTcp(1) - userid(-1)
[2013-11-19 11:47:44(877)] Invoke LogoutServer(userid=1) Elapse:9 ms
[2013-11-19 11:47:44(878)] Invoke BRAC_Connect(192.168.0.99,8906)=0
[2013-11-19 11:47:46(865)] Message OnConnect(bSuccess:0, errorcode=209)
[2013-11-19 11:47:46(866)] CheckClientSocketLink Connect(ip=192.168.0.99,port=8906)
[2013-11-19 11:47:51(892)] CheckClientSocketLink Connect(ip=192.168.0.99,port=8906)
[2013-11-19 11:47:52(083)] Server version: V4.8(Build Time:2013-09-21 10:04:04, Server OS:Windows)
[2013-11-19 11:47:52(084)] Message OnConnect(bSuccess:1, errorcode=0)
[2013-11-19 11:47:52(094)] Invoke LoginServer(username=user|test)
[2013-11-19 11:47:52(395)] Message OnLoginSystem(userid=1,errorcode=0,username=�����ʺ�), msg deliver worked(0)
[2013-11-19 11:47:52(396)] Load libmediautil.so success!(V4.8 Build Time:Sep 23 2013 21:09:36)
[2013-11-19 11:47:52(396)] Load libmediashow.so success!(V4.8 Build Time:Sep 23 2013 21:09:34)
[2013-11-19 11:47:52(397)] Load libmediacore.so success!(V4.8 Build Time:Sep 23 2013 21:09:30)
[2013-11-19 11:47:52(417)] Connection to streaming media server successfully!(udp delay:10ms)
[2013-11-19 11:48:06(657)] socket error, disconnected by peer!, bTcp(1) - userid(-1)
[2013-11-19 11:48:06(679)] Invoke LogoutServer(userid=1) Elapse:11 ms
[2013-11-19 11:48:06(680)] Invoke BRAC_Connect(192.168.0.99,8906)=0
[2013-11-19 11:48:08(669)] Message OnConnect(bSuccess:0, errorcode=209)
[2013-11-19 11:48:08(669)] CheckClientSocketLink Connect(ip=192.168.0.99,port=8906)
[2013-11-19 11:48:17(676)] CheckClientSocketLink Connect(ip=192.168.0.99,port=8906)
[2013-11-19 11:48:17(887)] Server version: V4.8(Build Time:2013-09-21 10:04:04, Server OS:Windows)
[2013-11-19 11:48:17(888)] Message OnConnect(bSuccess:1, errorcode=0)
[2013-11-19 11:48:17(898)] Invoke LoginServer(username=user|test)
[2013-11-19 11:48:18(193)] Message OnLoginSystem(userid=1,errorcode=0,username=�����ʺ�), msg deliver worked(0)
[2013-11-19 11:48:18(195)] Load libmediautil.so success!(V4.8 Build Time:Sep 23 2013 21:09:36)
[2013-11-19 11:48:18(196)] Load libmediashow.so success!(V4.8 Build Time:Sep 23 2013 21:09:34)
[2013-11-19 11:48:18(197)] Load libmediacore.so success!(V4.8 Build Time:Sep 23 2013 21:09:30)
[2013-11-19 11:48:18(230)] Connection to streaming media server successfully!(udp delay:16ms)
[2013-11-19 11:48:33(402)] socket error, disconnected by peer!, bTcp(1) - userid(-1)
[2013-11-19 11:48:33(427)] Invoke LogoutServer(userid=1) Elapse:12 ms
[2013-11-19 11:48:33(428)] Invoke BRAC_Connect(192.168.0.99,8906)=0
[2013-11-19 11:48:35(409)] Message OnConnect(bSuccess:0, errorcode=209)
[2013-11-19 11:48:35(410)] CheckClientSocketLink Connect(ip=192.168.0.99,port=8906)
[2013-11-19 11:48:37(445)] CheckClientSocketLink Connect(ip=192.168.0.99,port=8906)
[2013-11-19 11:48:37(584)] Server version: V4.8(Build Time:2013-09-21 10:04:04, Server OS:Windows)
[2013-11-19 11:48:37(585)] Message OnConnect(bSuccess:1, errorcode=0)
[2013-11-19 11:48:37(595)] Invoke LoginServer(username=user|test)
[2013-11-19 11:48:37(896)] Message OnLoginSystem(userid=1,errorcode=0,username=�����ʺ�), msg deliver worked(0)
[2013-11-19 11:48:37(897)] Load libmediautil.so success!(V4.8 Build Time:Sep 23 2013 21:09:36)
[2013-11-19 11:48:37(898)] Load libmediashow.so success!(V4.8 Build Time:Sep 23 2013 21:09:34)
[2013-11-19 11:48:37(898)] Load libmediacore.so success!(V4.8 Build Time:Sep 23 2013 21:09:30)
[2013-11-19 11:48:37(918)] Connection to streaming media server successfully!(udp delay:9ms)
[2013-11-19 11:48:51(937)] socket error, disconnected by peer!, bTcp(1) - userid(-1)
[2013-11-19 11:48:51(957)] Invoke LogoutServer(userid=1) Elapse:12 ms
[2013-11-19 11:48:51(958)] Invoke BRAC_Connect(192.168.0.99,8906)=0
[2013-11-19 11:48:53(946)] Message OnConnect(bSuccess:0, errorcode=209)
[2013-11-19 11:48:53(946)] CheckClientSocketLink Connect(ip=192.168.0.99,port=8906)
[2013-11-19 11:49:00(049)] CheckClientSocketLink Connect(ip=192.168.0.99,port=8906)
[2013-11-19 11:49:00(222)] Server version: V4.8(Build Time:2013-09-21 10:04:04, Server OS:Windows)
[2013-11-19 11:49:00(223)] Message OnConnect(bSuccess:1, errorcode=0)
[2013-11-19 11:49:00(233)] Invoke LoginServer(username=user|test)
[2013-11-19 11:49:00(522)] Message OnLoginSystem(userid=1,errorcode=0,username=�����ʺ�), msg deliver worked(0)
[2013-11-19 11:49:00(522)] Load libmediautil.so success!(V4.8 Build Time:Sep 23 2013 21:09:36)
[2013-11-19 11:49:00(523)] Load libmediashow.so success!(V4.8 Build Time:Sep 23 2013 21:09:34)
[2013-11-19 11:49:00(524)] Load libmediacore.so success!(V4.8 Build Time:Sep 23 2013 21:09:30)
[2013-11-19 11:49:00(544)] Connection to streaming media server successfully!(udp delay:9ms)
[2013-11-19 11:49:12(497)] socket error, disconnected by peer!, bTcp(1) - userid(-1)
[2013-11-19 11:49:12(515)] Invoke LogoutServer(userid=1) Elapse:1 ms
[2013-11-19 11:49:12(516)] Invoke BRAC_Connect(192.168.0.99,8906)=0
[2013-11-19 11:49:14(507)] Message OnConnect(bSuccess:0, errorcode=209)
[2013-11-19 11:49:14(508)] CheckClientSocketLink Connect(ip=192.168.0.99,port=8906)
[2013-11-19 11:49:23(599)] CheckClientSocketLink Connect(ip=192.168.0.99,port=8906)
[2013-11-19 11:49:23(739)] Server version: V4.8(Build Time:2013-09-21 10:04:04, Server OS:Windows)
[2013-11-19 11:49:23(739)] Message OnConnect(bSuccess:1, errorcode=0)
[2013-11-19 11:49:23(750)] Invoke LoginServer(username=user|test)
[2013-11-19 11:49:24(062)] Message OnLoginSystem(userid=1,errorcode=0,username=�����ʺ�), msg deliver worked(0)
[2013-11-19 11:49:24(063)] Load libmediautil.so success!(V4.8 Build Time:Sep 23 2013 21:09:36)
[2013-11-19 11:49:24(063)] Load libmediashow.so success!(V4.8 Build Time:Sep 23 2013 21:09:34)
[2013-11-19 11:49:24(064)] Load libmediacore.so success!(V4.8 Build Time:Sep 23 2013 21:09:30)
[2013-11-19 11:49:24(089)] Connection to streaming media server successfully!(udp delay:12ms)
作者: admin 时间: 2013-11-19 12:31
您好,请问用我们的标准示例程序也会这样吗?
在您的日志中发现有如下出错提示:
Message OnConnect(bSuccess:0, errorcode=209)
其中errorcode=209表示该用户在其它计算机上登录,所以可能是您的业务服务器每次分配的userid重复,所以有两种解决方案:
1、修改AnyChatCoreServer.ini,将CloseFrontLink=1改为:CloseFrontLink=0,具体的作用请参考《服务器用户手册》,在SDK包的doc\server目录下;
2、修改您的业务服务器程序,分配不同的userid,参考:http://bbs.anychat.cn/forum.php?mod=viewthread&tid=12&extra=page%3D1
作者: 花花猪 时间: 2013-11-19 13:07
说白了,就是重复登录对吧?!
作者: admin 时间: 2013-11-19 13:28
是的。
作者: 花花猪 时间: 2013-11-19 13:51
// 透明通道回调函数
- (void) OnAnyChatTransBufferCallBackint) dwUserid : (NSData*) lpBuf{
我用账号1 发一条消息给账号3 ,这个回调函数走了两次!
也就是我发一条消息,接收到的都是两条,这是怎么回事?麻烦了
作者: 花花猪 时间: 2013-11-19 13:54
这是我的DEBUG输出
NSLog(@"透明通道回调函数=====%d=====%@====%@",dwUserid,lpBuf,result);
2013-11-19 13:51:56.538 shiqiang[2810:c07] 透明通道回调函数=====4=====<6676e4b8 8de58f8d e5afb9e5 859ae79a 84e5b7a5 e4baba>====fv不反对党的工人
2013-11-19 13:51:58.677 shiqiang[2810:c07] path====(
"/Users/ouxiaojie/Library/Application Support/iPhone Simulator/6.1/Applications/D7BDE9F7-0232-488F-9802-E52B9E74A0FE/Library/Documentation"
)
2013-11-19 13:52:00.766 shiqiang[2810:c07] 透明通道回调函数=====4=====<6676e4b8 8de58f8d e5afb9e5 859ae79a 84e5b7a5 e4baba>====fv不反对党的工人
2013-11-19 13:52:14.974 shiqiang[2810:c07] path====(
"/Users/ouxiaojie/Library/Application Support/iPhone Simulator/6.1/Applications/D7BDE9F7-0232-488F-9802-E52B9E74A0FE/Library/Documentation"
)
欢迎光临 AnyChat技术支持论坛 (http://bbs.anychat.cn/) |
Powered by Discuz! X3 |