socket recv input/output error

nanyun2010 2012-08-21 02:26:12
程序提示recv的时候提示5 input/output error,最后以为打开的文件数过多而退出,程序跑了一段时间才错误的,input/output error这是什么原因啊,谢谢!
...全文
518 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
qq120848369 2012-08-23
  • 打赏
  • 举报
回复
ulimit -a看看open files就知道了
zhanshen2891 2012-08-23
  • 打赏
  • 举报
回复
你用的什么网络模型?是不是同步问题?buf或者socket同时访问造成的。
Gonefar 2012-08-23
  • 打赏
  • 举报
回复
把出错代码贴出来看看。
nanyun2010 2012-08-22
  • 打赏
  • 举报
回复
顶起!
smsgreenlife 2012-08-21
  • 打赏
  • 举报
回复
· 出现网络联机错误Socket error #11001

表示您的计算机无法连上服务器,请检查您的Proxy设定以及Proxy相关账号,或暂时取消您防毒软件的「个人防火墙」。

· 出现网络联机错误Socket error #11004

应该是网络联机状态问题,请用户检查网络联机是否正常。

· 出现网络联机错误Socket error #10060 Connection Timed Out

表示您与服务器发生联机逾时错误,请检查您的Proxy相关设定,以及Proxy Server是否已将SSL 443 port打开。

· 出现网络联机错误Socket error #10061

表示服务器忙碌中无法与您建立联机,请稍后再试。

· 出现网络联机错误Socket error #10022

请您上网更新Windows操作系统组件。Windows NT version 4.0的用户请下载安装 Service Pack 5(含)以上。

· 出现Internal Server Error

主机忙碌中,请您稍后再试。

· 上传时出现Socket error #10022 Invalid argument.

请上网更新Windows操作系统组件(windows update)。Windows NT version 4.0的用户请下载安装 Service Pack 5(含)以上。

· 上传时出现socket error #10054 Connection reset by peer

原因为连接被防火樯或proxy中断"或因为您有安装ip分享器请将ip分享器先拿掉,直接将计算机接adsl的线路后重新上传。

· 上传时出现socket error #10057 Connection reset by peer

原因为系统文件被破坏,请进行系统的杀毒,关闭杀毒软件、防火墙。


INDY9开发程序中反馈的Socket Errors

下面是Socket Error的错误码和描述:

Socket error 0 - Directly send error

Socket error 10004 - Interrupted function call

Socket error 10013 - Permission denied

Socket error 10014 - Bad address

Socket error 10022 - Invalid argument

Socket error 10024 - Too many open files

Socket error 10035 - Resource temporarily unavailable

Socket error 10036 - Operation now in progress

Socket error 10037 - Operation already in progress

Socket error 10038 - Socket operation on non-socket

Socket error 10039 - Destination address required

Socket error 10040 - Message too long

Socket error 10041 - Protocol wrong type for socket

Socket error 10042 - Bad protocol option

Socket error 10043 - Protocol not supported

Socket error 10044 - Socket type not supported

Socket error 10045 - Operation not supported

Socket error 10046 - Protocol family not supported

Socket error 10047 - Address family not supported by protocol family

Socket error 10048 - Address already in use

Socket error 10049 - Cannot assign requested address

Socket error 10050 - Network is down

Socket error 10051 - Network is unreachable

Socket error 10052 - Network dropped connection on reset

Socket error 10053 - Software caused connection abort

Socket error 10054 - Connection reset by peer

Socket error 10055 - No buffer space available

Socket error 10056 - Socket is already connected

Socket error 10057 - Socket is not connected

Socket error 10058 - Cannot send after socket shutdown

Socket error 10060 - Connection timed out

Socket error 10061 - Connection refused

Socket error 10064 - Host is down

Socket error 10065 - No route to host

Socket error 10067 - Too many processes

Socket error 10091 - Network subsystem is unavailable

Socket error 10092 - WINSOCK.DLL version out of range

Socket error 10093 - Successful WSAStartup not yet performed

Socket error 10094 - Graceful shutdown in progress

Socket error 11001 - Host not found

Socket error 11002 - Non-authoritative host not found

Socket error 11003 - This is a non-recoverable error

Socket error 11004 - Valid name, no data record of requested type



WSAEADDRINUSE (10048) Address already in use

WSAECONNABORTED (10053) Software caused connection abort

WSAECONNREFUSED (10061) Connection refused

WSAECONNRESET (10054) Connection reset by peer

WSAEDESTADDRREQ (10039) Destination address required

WSAEHOSTUNREACH (10065) No route to host

WSAEMFILE (10024) Too many open files

WSAENETDOWN (10050) Network is down

WSAENETRESET (10052) Network dropped connection

WSAENOBUFS (10055) No buffer space available

WSAENETUNREACH (10051) Network is unreachable

WSAETIMEDOUT (10060) Connection timed out

WSAHOST_NOT_FOUND (11001) Host not found

WSASYSNOTREADY (10091) Network sub-system is unavailable

WSANOTINITIALISED (10093) WSAStartup() not performed

WSANO_DATA (11004) Valid name, no data of that type

WSANO_RECOVERY (11003) Non-recoverable query error

WSATRY_AGAIN (11002) Non-authoritative host found

WSAVERNOTSUPPORTED (10092) Wrong WinSock DLL version

ies_sweet 2012-08-21
  • 打赏
  • 举报
回复
检查一下socket的打开数量,是否没有及时关闭?
另外,看一下socket的数值,判断一下打开是否成功?

还是要单步调试
在错误附近观测一下重要数据的值
nanyun2010 2012-08-21
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 的回复:]

先单步调试看看那一句开始出错,再分析。
gdb ..
break main
step/next
[/Quote]

知道是在那错的,但是不知道这种错误是由什么引起的。请高手赐教。
Gloveing 2012-08-21
  • 打赏
  • 举报
回复
5 Access is denied. ERROR_ACCESS_DENIED
Gonefar 2012-08-21
  • 打赏
  • 举报
回复
先单步调试看看那一句开始出错,再分析。
gdb ..
break main
step/next
nanyun2010 2012-08-21
  • 打赏
  • 举报
回复
顶起!!!!

69,335

社区成员

发帖
与我相关
我的任务
社区描述
C语言相关问题讨论
社区管理员
  • C语言
  • 花神庙码农
  • 架构师李肯
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧