事件 SOCKET_DATA 未收到 AS3 中的所有消息
我的 AS3 客户端程序在发送大量消息时没有收到发送给它的所有数据。我确实知道不是我的服务器导致了此问题,因为所有消息均已正确接收和发送。我的 as3 客户端只是没有收到所有发送的数据。
private function socketData(event:ProgressEvent):void {
while(this.socket.bytesAvailable}
var str:String = this.socket.readUTFBytes(this.socket.bytesAvailable);
trace(str);
}
}
你们有人知道解决办法吗?
My AS3 client program does not receive all the data that was sent to it when sending a lot of messages. I do know its not my server causing this problem because all the messages are received and send correctly. My as3 client just does not receive all the data send.
private function socketData(event:ProgressEvent):void {
while(this.socket.bytesAvailable}
var str:String = this.socket.readUTFBytes(this.socket.bytesAvailable);
trace(str);
}
}
Does any of you know a solution?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
今天下午我也遇到了同样的问题。最后我想出了一个解决方案:
事实上,您必须像这样逐字节读取消息:
我希望这会对您有所帮助:)
I had the same issue this afternoon. Finally i came with a solution:
In fact, you have to read the message byte by byte like so:
I hope this will help you :)
问题解决了,我只需打开路由器上的端口即可。
Problem solved, I just had to open the port on my router.