Socket Exception-10060
Started by mohammad, Apr 27 2012 03:22 PM
4 replies to this topic
#1
Posted 27 April 2012 - 03:22 PM
Hi All,
My Netduino Plus sends fixed-length requests to a gateway by a frequency of 10s (heart beat). I don't know why I get this exception after a while. Also, The duration of getting this exception is very different (from 2 hours to 19hours).
#### Exception System.Net.Sockets.SocketException - CLR_E_FAIL (6) ####
#### Message:
#### Microsoft.SPOT.Net.SocketNative::send [IP: 0000] ####
#### System.Net.Sockets.Socket::Send [IP: 0018] ####
#### System.Net.Sockets.Socket::Send [IP: 0010] ####
#### NetduinoPeer.Client::SendRequest [IP: 004c] ####
#### NetduinoPeer.Client::run [IP: 0018] ####
#### NetduinoPeer.Mainframe::runClient [IP: 0033] ####
#### SocketException ErrorCode = 10060
#### SocketException ErrorCode = 10060
A first chance exception of type 'System.Net.Sockets.SocketException' occurred in Microsoft.SPOT.Net.dll
#### SocketException ErrorCode = 10060
An unhandled exception of type 'System.Net.Sockets.SocketException' occurred in Microsoft.SPOT.Net.dll
Thanks for your reply
Mohammad
#2
Posted 27 April 2012 - 03:24 PM
10060 is known as a constant by the name WSAETIMEDOUT according to the Windows Sockets Error Codes:
Does that help?
Connection timed out.
A connection attempt failed because the connected party did not properly respond after a period of time, or the established connection failed because the connected host has failed to respond.
Does that help?
"Fact that I'm a moderator doesn't make me an expert in things." Stefan, the eternal newb!
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs
#3
Posted 27 April 2012 - 03:50 PM
What's on the other side of the gateway, the internets? I trap 10060 in a try catch block around polling a NTP server for time and reboot if thrown. This seems to work well as the error has always been transient and the next attempt is OK.
#4
Posted 27 April 2012 - 04:07 PM
Thank both of you.
@Stefan: you mean that my gateway, which is a web server (PC), has failed in responding to my Netduino request?
@Emg: The gateway is an internet-connected web server. According to my understanding from your reply, Netduino should be rebooted when it is faced this exception. Am I right?
#5
Posted 27 April 2012 - 04:35 PM
According to my understanding from your reply, Netduino should be rebooted when it is faced this exception. Am I right?
I don't think it's the 'right' way to handle this, but I do it as I've yet to find a reliable means to gracefully recover from socket errors. See other threads on socket issues like this: Ethernet never works if not connected on boot up?
Do a forum search for 10060 and you will see different issues.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users