简体   繁体   English

C#异步TCP套接字通信在2.try上通过网络上的其他计算机崩溃

[英]C# Asynchronous TCP socket communication crashes on 2.try over seperate computers at network

I'm trying to develop an asynch TCP server-client application. 我正在尝试开发一个异步TCP服务器-客户端应用程序。 In my application i'm using MSDN article as a start point. 在我的应用程序中,我以MSDN文章为起点。 I changed the code block for transfering serialized objects instead transfering string. 我更改了用于传输序列化对象而不是字符串的代码块。 And i'm transferring large data in this objects with several packages. 我正在使用几个包在此对象中传输大数据。

On my local machine everything fine: In the begining client connects, server accepts and they connected till i end. 在我的本地计算机上,一切都很好:在开始的客户端连接中,服务器接受并连接,直到我结束。 Client send request when i trig and starts to waiting data, server receives data, and server immidiately returns a result sending, client receives this result and operation is over. 当我触发并开始等待数据时,客户端发送请求,服务器接收数据,服务器立即返回结果发送,客户端接收该结果,操作结束。 Whilst still system has connected, i'm trigging client again and the transaction is repeating. 虽然系统仍然连接,但我再次触发客户端,并且交易正在重复。 How many time i trig everything working fine. 我试了多少次一切正常。

But at any other intranet computer, client starts connection, server accepts and transaction works fine at first time.. But at the second try, server answering result but client application suspending at BeginReceive-EndReceive cycle... 但是在任何其他Intranet计算机上,客户端在第一时间启动连接,服务器接受并且事务正常运行。但是在第二次尝试中,服务器应答结果,但是客户端应用程序在BeginReceive-EndReceive周期处挂起...

What is wrong? 怎么了? Are there any nerwork limitation for asynch .net c# TCP socket infrastructure? 异步.net c#TCP套接字基础结构有什么限制吗?

没有代码很难说,但是请检查您的keepalive设置(尝试将其关闭)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM