Groups
Groups
Sign in
Groups
Groups
高性能服务器研发与运营邮件列表
Conversations
About
Send feedback
Help
烦恼的完成端口,求救!!!
6 views
Skip to first unread message
hxk
unread,
Mar 17, 2006, 7:17:57 AM
3/17/06
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to 高性能网络编程邮件列表
我用完成端口设计的服务器目前已经运行在Windows的服务器上,Win2003Server,双CPU,4个G内存。程序运行几个小时后,突然和所有的客户断开,然后显示的错误是:"由于套接字没有连接并且(当使用一个
sendto
调用发送数据报套接字时)没有提供地址,发送或接收数据的请求没有被接受。",然后过了一会儿后,客户又慢慢的一个一个连接上来了。我的客户数不是非常多,大概在830个左右,可是数据传输很频繁,数量包不是非常大,最大2K。
不知道大家是否碰到过,请大家帮帮忙,出个主意啊。
guowei...@126.com
unread,
Mar 22, 2006, 2:58:10 AM
3/22/06
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to 高性能网络编程邮件列表
估计是你没有释放socket句柄,导致socket句柄分配时,覆盖了原来分配的,
呵呵,纯属猜测
Alan Huang
unread,
Mar 26, 2006, 2:56:04 AM
3/26/06
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to 高性能网络编程邮件列表
这个好像是WINDOWS的痼疾,当SOCKET频繁连接断开超过某个限度的时候,会导致系统没有及时释放句柄并进入恶性循环,就算你做了CLOSE之类的事,返回的错误好像是10055,10061之类的,你查一下MSDN.我前段时间做stresstest,
服务器是LINUX下的,测试客户端是跑在WIN2003下的,结果WIN的表现很差劲,开多了一会儿就不行了。我也入行不久,说得不对的大家多指教。
guowei...@126.com
unread,
Mar 26, 2006, 5:08:53 AM
3/26/06
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to 高性能网络编程邮件列表
程序应该还是有问题,我遇到过10055,10061类型的错误,最后发现还是自己程序有问题
Alan Huang
unread,
Mar 27, 2006, 2:37:24 AM
3/27/06
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to 高性能网络编程邮件列表
我在查看了一下我的代码,特别是disconnect那一块,感觉没有问题。上封回复说的错误号我说错了,应该是10048,在WINDOWS下netstat
-p tcp > c:/x.txt
可以看到,从1025到4999这区间里的几乎所有(除掉一些别的应用程序)的端口都处在TIME_WAIT的状态,在网上查TCP真正断开链接放开端口的时间,可能由于各个系统的实现方法而有不同。我现在也是不知其所以然。
Reply all
Reply to author
Forward
0 new messages