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

SMTP_Client Timeout

netmf toolbox

  • Please log in to reply
No replies to this topic

#1 Casmer

Casmer

    Member

  • Members
  • PipPip
  • 22 posts
  • LocationGrant, FL

Posted 28 September 2013 - 04:13 AM

I am using the SMTP Client from the net mf tool box and I am trying to figure out how to make it time out after 10 seconds when it can't connect to the smtp server. instead it just hangs. I am trying to set the receive timeout on the IntegratedSocket class, but I am not sure if its the connect or the receive time that is failing and so far setting the connect time is failing entirely.

 

_Sock.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReceiveTimeout, ReceiveTimeout);

 

how do you do a connection time out? I was thinking I start a thread and wait for it, then abort it after the timeout period expires, but was hoping there is a better way.







Also tagged with one or more of these keywords: netmf, toolbox

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.