几秒钟后客户端断开连接(lidgren) [英] Client disconnct after a few seconds(lidgren)

查看:203
本文介绍了几秒钟后客户端断开连接(lidgren)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

哪些步骤将重现该问题?
1.将kinect关节从远程客户端发送到服务器,服务器将数据中继到另一个客户端(帧速率约为30fps,每帧84个字节)
2. 2个客户端通信几秒钟后,他们断开了连接


什么是预期的输出?您会看到什么呢?
2个客户端应继续互相通信.

您正在使用什么版本的产品?在什么操作系统上?
Lidgren版本3,操作系统:Windows 7 Enterprise(32位)

请在下面提供任何其他信息.

以下是服务器端记录的消息,省略了数据消息:

What steps will reproduce the problem?
1. Send the kinect joint from a remote client to server and the server relay the data to another client(the frame rate is about 30fps,84 bytes per frame)
2. After 2 clients communicating for a few seconds, they got disconnected


What is the expected output? What do you see instead?
2 clients should be communicating with each other continously.

What version of the product are you using? On what operating system?
Lidgren version 3, os:windows 7 enterprise(32 bit)

Please provide any additional information below.

Following are recorded message at server side,data message is omitted:

[DebugMessage]Socket bound to 0.0.0.0:5000: True
[DebugMessage]Network thread started
[StatusChanged](RespondedConnect)Remotely requested connect
[StatusChanged](Connected) Connected to 44AC3443386C21C1
[DebugMessage]Initiated average roundtrip time to 68.84 ms Remote time is:42.8156032562256
[StatusChanged](RespondedConnect)Remotely requested connect
[StatusChanged](Connected) Connected to 171EB0CC85A12494
[DebugMessage]Initiated average roundtrip time to 8.21 ms Remote time is:16.8995113372803
[StatusChanged](Disconnected)Connection timed out





任何人有任何建议吗?





any one has any suggestions?

推荐答案

.NET框架提供了TimoutException类.查看服务器端消息时,它看起来像为进程或操作分配的时间到期时引发的异常.使用TimeoutException可以获取更多详细信息,例如:

.NET framework provides TimoutException class. On reviewing the server side message, it looks like the exception that is thrown when the time allotted for a process or operation has expired. Use TimeoutException to fetch more details as:

try
  {
  // Only catch timeout exceptions.
    catch (TimeoutException e)
    {
        // Log the specific error from e.Message
    }
  }


这篇关于几秒钟后客户端断开连接(lidgren)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆