Flex 无法足够快地处理 Java 套接字数据
我通过套接字从 java 向 Flex 客户端发送一些数据,但 Flex 端似乎无法正确处理它。 在java中,我循环遍历8个对象,并为每个对象创建一个长字符串 1:lsls:2:3:justexample 然后java在每次迭代时都会 writeToSocket("1:lsls:2:3:justexample")循环。 但在客户端,8个中似乎只有2个到达。可能是什么问题? 谢谢。
I'm sending through a socket from java to flex client some data and the flex side can't seem to handle it right.
In the java i'm looping over 8 objects and for each object I create a long string 1:lsls:2:3:justexample then the java does writeToSocket("1:lsls:2:3:justexample") for every iteration of the loop.
But in the client side, it seems that only 2 out of the 8 arrived. what can be the problem?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您的客户端读取数据的速度不够快,则连接可能会被 Java 端过早重置 - 如果您在发送数据后
close()
套接字。您可以尝试 setSoLinger() 在连接实际关闭之前允许有更多时间传输排队数据。If your client does not read the data fast enough it is possible that the connection is prematurely reset by the Java side - if you
close()
the socket after sending that is. You could try setSoLinger() to allow more time for transmission of queued data before the connection is actually closed.