Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Socket Exception-10060


  • Please log in to reply
4 replies to this topic

#1 mohammad

mohammad

    Advanced Member

  • Members
  • PipPipPip
  • 79 posts

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 :rolleyes: Mohammad

#2 Stefan

Stefan

    Moderator

  • Members
  • PipPipPip
  • 1965 posts
  • LocationBreda, the Netherlands

Posted 27 April 2012 - 03:24 PM

10060 is known as a constant by the name WSAETIMEDOUT according to the Windows Sockets Error Codes:

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

#3 emg

emg

    Advanced Member

  • Members
  • PipPipPip
  • 129 posts

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 mohammad

mohammad

    Advanced Member

  • Members
  • PipPipPip
  • 79 posts

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 emg

emg

    Advanced Member

  • Members
  • PipPipPip
  • 129 posts

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

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.