国产+高潮+在线,国产 av 仑乱内谢,www国产亚洲精品久久,51国产偷自视频区视频,成人午夜精品网站在线观看

多人聊天中發(fā)數(shù)據(jù)的間隔問(wèn)題

songzhao831

在一個(gè)客戶端中, 測(cè)試出來(lái)是大于200ms的間隔, 所有數(shù)據(jù)能處理, 但小于200ms. 數(shù)據(jù)就無(wú)法處理, 到不了onmessage(). 能接收到.

4429 7 0
7個(gè)回答

walkor 打賞

沒(méi)理解你說(shuō)的問(wèn)題,請(qǐng)把現(xiàn)象詳細(xì)將下吧

  • songzhao831 2014-09-25

    用一個(gè)客戶端不停地向服務(wù)端發(fā)數(shù)據(jù). 間隔時(shí)間小于100ms.

songzhao831

就是客戶端以100ms為周期, 向服務(wù)器端簡(jiǎn)單循環(huán)發(fā)數(shù)據(jù), , 在onmessage中 將數(shù)據(jù)返回來(lái), 有很高的幾率返回不了.

  • 暫無(wú)評(píng)論
walkor 打賞

可能是粘包了,可以抓包看下網(wǎng)絡(luò)上數(shù)據(jù)是否有發(fā)送出去。
處理粘包可以參考workerman手冊(cè)

  • 暫無(wú)評(píng)論
songzhao831

手冊(cè)我看完了, preread_length = 10 也和包頭一樣長(zhǎng). 不知道到底為什么會(huì)這樣子... 如果頭解析不對(duì), 我是不是應(yīng)該返回一個(gè)錯(cuò)誤. 這樣把連接斷掉

  • 暫無(wú)評(píng)論
songzhao831

給你發(fā)個(gè)log. 在收到整個(gè)數(shù)據(jù)后,. 應(yīng)該會(huì)進(jìn)入到onmessage. 但這個(gè)收到這么多后才進(jìn)入一次onmessage. 前面的數(shù)據(jù)都丟失掉了.

buffer=HEAD#21#cl
 total_length=21
 still need recevie bytes:18
 buffer=HEAD#21#client#02#22222#33#|
 total_length=21
 buffer recive done
 buffer=HEAD#21#cl
 total_length=21
 still need recevie bytes:18
 buffer=HEAD#21#client#02#22222#33#|
 total_length=21
 buffer recive done
 buffer=HEAD#21#cl
 total_length=21
 still need recevie bytes:18
 buffer=HEAD#21#client#02#22222#33#|
 total_length=21
 buffer recive done
 buffer=HEAD#21#cl
 total_length=21
 still need recevie bytes:18
 buffer=HEAD#21#client#02#22222#33#|
 total_length=21
 buffer recive done
 buffer=HEAD#21#cl
 total_length=21
 still need recevie bytes:18
 buffer=HEAD#21#client#02#22222#33#|
 total_length=21
 buffer recive done
 buffer=HEAD#21#cl
 total_length=21
 still need recevie bytes:18
 buffer=HEAD#21#client#02#22222#33#|
 total_length=21
 buffer recive done
 On message: uid=1006message=HEAD#21#client#02#22222#33#|Array
(
     => 1006
)
  • 暫無(wú)評(píng)論
walkor 打賞

請(qǐng)直接貼
1、你的協(xié)議格式
2、Gateway.conf配置
3、onGatewayMessage處理粘包的代碼
4、客戶端發(fā)送的數(shù)據(jù)
5、還有你的日志打印的代碼和格式

  • 暫無(wú)評(píng)論
songzhao831

更新了軟件后好了.

  • 暫無(wú)評(píng)論
年代過(guò)于久遠(yuǎn),無(wú)法發(fā)表回答
??