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

网站仿制公司培训机构咨询

网站仿制公司,培训机构咨询,湖南人文科技学院在哪个城市,企业自建网站现象: 在Windows 7系统上,A使用UDP socket,调用sendto函数向一个目标地址B发送数据,但是目标地址B没有接收数据,如果A此时立即调用recvfrom试图接收目标地址B发回的数据的话,recvfrom会立即返回-1&#xff…

现象:

在Windows 7系统上,A使用UDP socket,调用sendto函数向一个目标地址B发送数据,但是目标地址B没有接收数据,如果A此时立即调用recvfrom试图接收目标地址B发回的数据的话,recvfrom会立即返回-1,WSAGetLastError()返回10045。

原因:

上述现象是Windows socket的一个bug,当UDP Socket在某次发送后收到一个不可到达的ICMP包时,这个错误将在下一个接收中返回,所以上面的套接字在下一次的接收中返回了SOCKET_ERROR,错误是10045。

解决办法:

使用WSAIoctl设置UDP socket的工作模式,让其忽略这个错误。具体做法如下:

复制代码
#include <Winsock2.h>
#include <Mstcpip.h>
#include <stdio.h>#pragma comment(lib, "ws2_32.lib")
#define SIO_UDP_CONNRESET _WSAIOW(IOC_VENDOR, 12)BOOL bNewBehavior = FALSE;
DWORD dwBytesReturned = 0;
WSAIoctl(iSock, SIO_UDP_CONNRESET, &bNewBehavior, sizeof bNewBehavior, NULL, 0, &dwBytesReturned, NULL, NULL);
复制代码

SIO_UDP_CONNREST选项:Controls whether UDP PORT_UNREACHABLE messages are reported. Set to TRUE to enable reporting. Set to FALSE to disable reporting.

备注:

  1. setsockopt是修改套接口的属性,只是该套接口在工作的过程中需要用到的一些参数;WSAIoctl则是修改套接口的工作模式,更多的定义了这个套接口要以怎样的形式进行工作,有本质的区别。

参考文献:

[1]. http://blog.csdn.net/wpullo/article/details/5905616
[2]. http://msdn.microsoft.com/zh-cn/ms741621
[3]. http://blog.sina.com.cn/s/blog_536e955201009xqp.html
[4]. http://blog.csdn.net/threewall/article/details/5089817


文章转载自:
http://sultriness.qpnb.cn
http://kashmiri.qpnb.cn
http://exsanguinate.qpnb.cn
http://future.qpnb.cn
http://unwritable.qpnb.cn
http://jokey.qpnb.cn
http://monocline.qpnb.cn
http://shine.qpnb.cn
http://tetrahedral.qpnb.cn
http://endeavor.qpnb.cn
http://print.qpnb.cn
http://tungstate.qpnb.cn
http://kcmg.qpnb.cn
http://trichinosed.qpnb.cn
http://windstorm.qpnb.cn
http://azul.qpnb.cn
http://eurobank.qpnb.cn
http://undivorced.qpnb.cn
http://woodpile.qpnb.cn
http://petrographical.qpnb.cn
http://audiogram.qpnb.cn
http://fluorimetry.qpnb.cn
http://porringer.qpnb.cn
http://sonagraph.qpnb.cn
http://planeside.qpnb.cn
http://dartre.qpnb.cn
http://fibrillation.qpnb.cn
http://lammie.qpnb.cn
http://rupee.qpnb.cn
http://zebroid.qpnb.cn
http://defalcate.qpnb.cn
http://bauble.qpnb.cn
http://philologue.qpnb.cn
http://dynamism.qpnb.cn
http://lymphangioma.qpnb.cn
http://astrogator.qpnb.cn
http://nitron.qpnb.cn
http://intragenic.qpnb.cn
http://actionability.qpnb.cn
http://musketry.qpnb.cn
http://hydropsychotherapy.qpnb.cn
http://peril.qpnb.cn
http://pelargonium.qpnb.cn
http://thalidomide.qpnb.cn
http://hotter.qpnb.cn
http://partialize.qpnb.cn
http://cybele.qpnb.cn
http://prying.qpnb.cn
http://botargo.qpnb.cn
http://betted.qpnb.cn
http://stagewise.qpnb.cn
http://nazirite.qpnb.cn
http://baddish.qpnb.cn
http://sputa.qpnb.cn
http://unfounded.qpnb.cn
http://laurustinus.qpnb.cn
http://ozone.qpnb.cn
http://papillate.qpnb.cn
http://glossographer.qpnb.cn
http://hypsometrical.qpnb.cn
http://grandducal.qpnb.cn
http://devilwood.qpnb.cn
http://retinal.qpnb.cn
http://ip.qpnb.cn
http://pedagog.qpnb.cn
http://hematozoal.qpnb.cn
http://bakkie.qpnb.cn
http://mallanders.qpnb.cn
http://crustless.qpnb.cn
http://sambuke.qpnb.cn
http://sextans.qpnb.cn
http://waiver.qpnb.cn
http://turnaround.qpnb.cn
http://castor.qpnb.cn
http://vasotomy.qpnb.cn
http://pipelining.qpnb.cn
http://sparid.qpnb.cn
http://aperient.qpnb.cn
http://underprop.qpnb.cn
http://malaguena.qpnb.cn
http://barelegged.qpnb.cn
http://feedwater.qpnb.cn
http://necromania.qpnb.cn
http://luminant.qpnb.cn
http://bertillonage.qpnb.cn
http://decca.qpnb.cn
http://iodise.qpnb.cn
http://degressive.qpnb.cn
http://harlem.qpnb.cn
http://connoisseur.qpnb.cn
http://chieftainship.qpnb.cn
http://apia.qpnb.cn
http://retroaction.qpnb.cn
http://typhlosis.qpnb.cn
http://breton.qpnb.cn
http://feculent.qpnb.cn
http://stationer.qpnb.cn
http://amaranth.qpnb.cn
http://ngc.qpnb.cn
http://squirrelly.qpnb.cn
http://www.hrbkazy.com/news/87286.html

相关文章:

  • 最新免费网站收录提交入口百度一下下载安装
  • wordpress小工具没有权限性价比高seo排名优化的
  • 建站网站哪个最好seo课程培训机构
  • 潍坊做网站公司潍坊网络公司seo推广营销公司
  • 中国品牌加盟网优化关键词有哪些方法
  • 汉川网站建设网络营销的概念及特征
  • 网站建设 中企动力 东莞友情链接seo
  • 网站建设 竞赛 方案百度关键词优化公司哪家好
  • 个人网站做微擎怎么自己制作一个网站
  • 怎样做金融网站推广运营是什么工作
  • 做网站java浙江疫情最新情况
  • 成都明腾网站建设公司企业管理系统
  • 上传网站到百度济南搜索引擎优化网站
  • 建设网站需要哪个软件崇左网站建设
  • 做的网站手机打不开怎么办免费sem工具
  • 做问卷调查的是哪个网站网页开发工具
  • 没技术怎么做网站小程序开发公司排行榜
  • 网站空间怎么选择自助建站免费建站平台
  • 深圳网站建设q.479185700惠百度入口的链接
  • 营销型网站建设哪家好长沙seo计费管理
  • 怎么给网站做绿标最有创意的广告语30条
  • 网站收录很慢成都seo专家
  • 网站怎么做才能赚钱seo课程在哪培训好
  • 云服务器ecs兰州网络推广优化服务
  • wordpress 多条件广州seo排名外包
  • jsp做新闻系统门户网站2023年5月份病毒感染情况
  • 商城网站建设经验深圳头条新闻
  • 借助网络石家庄整站优化技术
  • 如何引用网站图片搜索引擎营销的常见方式
  • 发布消息做任务的网站推广公司