当前位置: 首页 > news >正文

地方生活门户网站wordpress 路由器

地方生活门户网站,wordpress 路由器,建设网站查询余额,做彩票网站服务器今天开发网络模型#xff0c;又遇到了10054的错误#xff0c;这是之前已经遇到过#xff0c;但是一直没有处理#xff0c;今天在网上查找方案#xff0c;看到一篇帖子#xff0c;觉得有点道理#xff0c;拷贝下来#xff0c;大家参详一二#xff0c;希望大牛给出正确的…今天开发网络模型又遇到了10054的错误这是之前已经遇到过但是一直没有处理今天在网上查找方案看到一篇帖子觉得有点道理拷贝下来大家参详一二希望大牛给出正确的解释。帖子是英文大概意思我明白不过翻译不太好原帖奉上。 问题描述 I have a C/S program. Client use socket to send a file to server, after send approximate more than 700k data, client(on win7) will receive a socket 10054 error which means Connection reset by peer. Server worked on CentOS 5.4, client is windows7 virtual machine run in virtual box. client and server communicate via a virtual network interface. The command port(send log) is normal, but the data port(send file) have the problem. If it was caused by wrong configuration of socket buffer size or something else? If anyone can help me check the problem. Thanks. Every time I call socket send a buffer equals 4096 byte send(socket, buffer, 4096, 0 ) CentOS socket config. down vote favorite #sysctl -a ... net.ipv4.tcp_rmem 4096 87380 4194304 net.ipv4.tcp_wmem 4096 16384 4194304 net.ipv4.tcp_mem 196608 262144 393216 net.ipv4.tcp_dsack 1 net.ipv4.tcp_ecn 0 net.ipv4.tcp_reordering 3 net.ipv4.tcp_fack 1 Im not quite understand what the socket buffer configuration means, if this will cause the receive incomplete result problem? 解答 down vote accepted Its almost definitely a bug in your code. Most likely, one side thinks the other side has timed out and so closes the connection abnormally. The most common way this happens it that you call a receive function to get data, but you actually already got that data and just didnt realize it. So youre waiting for data that you have already received and thus time out. For example: 1) Client sends a message. 2) Client sends another message. 3) Server reads both messages but thinks it only got one, sends an acknowledge. 4) Client receives acknowledge, waits for second acknowledge which server will never send. 5) Server waits for second message which it actually already received. Now the server is waiting for the client and the client is waiting for the server. The server was coded incorrectly and didnt realize that it actually got two messages in one go. TCP does not preserve message boundaries. If you tell me more about your protocol, I can probably tell you in more detail what went wrong. What constitutes a message? Which side sends when? Are there any acknowledgements? And so on. But the short version is that each side is probably waiting for the other. Most likely, the connection reset by peer is a symptom. Your problem occurs, one side times out and aborts the connection. That causes the other side to get a connection reset because the other side aborted the connection. 2 down vote favorite I have a C/S program. Client use socket to send a file to server, after send approximate more than 700k data, client(on win7) will receive a socket 10054 error which means Connection reset by peer. Server worked on CentOS 5.4, client is windows7 virtual machine run in virtual box. client and server communicate via a virtual network interface. The command port(send log) is normal, but the data port(send file) have the problem. If it was caused by wrong configuration of socket buffer size or something else? If anyone can help me check the problem. Thanks. Every time I call socket send a buffer equals 4096 byte send(socket, buffer, 4096, 0 ) CentOS socket config. 4 down vote accepted Its almost definitely a bug in your code. Most likely, one side thinks the other side has timed out and so closes the connection abnormally. The most common way this happens it that you call a receive function to get data, but you actually already got that data and just didnt realize it. So youre waiting for data that you have already received and thus time out. For example: 1) Client sends a message. 2) Client sends another message. 3) Server reads both messages but thinks it only got one, sends an acknowledge. 4) Client receives acknowledge, waits for second acknowledge which server will never send. 5) Server waits for second message which it actually already received. Now the server is waiting for the client and the client is waiting for the server. The server was coded incorrectly and didnt realize that it actually got two messages in one go. TCP does not preserve message boundaries. If you tell me more about your protocol, I can probably tell you in more detail what went wrong. What constitutes a message? Which side sends when? Are there any acknowledgements? And so on. But the short version is that each side is probably waiting for the other. Most likely, the connection reset by peer is a symptom. Your problem occurs, one side times out and aborts the connection. That causes the other side to get a connection reset because the other side aborted the connection.
http://www.w-s-a.com/news/554086/

相关文章:

  • wordpress导入网站模板seo自学网官网
  • 购物网站服务器带宽北京网站开发周期
  • 同性做视频网站网站怎么添加栏目
  • 新余网站设计seo自学网站
  • 新乡个人网站建设价格wordpress数据插件
  • 你是网站设计有限公司的项目经理网站推广的重要性
  • 网站定制开发怎么写泸州设计公司有哪些
  • 上海网站建设zj kt迅速编程做网站
  • 郑州服装 网站建设网站栏目合理性
  • 平面设计在线网站最新汽油价格调整最新消息
  • 刷单网站建设wordpress缩略图 裁剪
  • 视差 网站泰州公司做网站
  • 广州网站优化系统怎么做淘客网站
  • 类似凡科互动的网站wordpress网站下载
  • 临沂网站制作公司安卓app开发实例教程
  • 泰州做网站 泰公网络科技公司网站升级中html
  • 如何做授权网站网站设计心得
  • 网站排名快速上升wordpress自动标签页
  • 做的好的手机网站有哪些万网域名交易
  • 网站怎么做漂亮点做陶瓷的公司网站
  • 软件开发设计制作网站下载自己怎么做视频收费网站
  • 江苏省建设安全协会网站天津网站建设哪家公司好
  • 资源类网站怎么做的网站上线准备工作
  • 长沙专业网站建设怎么做企业建站公司服务
  • 肇庆市有限公司网站建设手机直接看的网站有哪些
  • 织梦修改网站后备份英语作文模板高中
  • 个人网站域名用什么好上海公司拍沪牌需要什么条件
  • 网站建设 保密做网站赚钱交税
  • 食品建设网站前的市场分析进出口网站贸易平台有哪些
  • php商城网站建设个人网站用什么服务器