Sockets and Timeouts

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
spelman
Posts: 20
Joined: Thu Sep 22, 2011 5:38 pm

Sockets and Timeouts

Post by spelman »

Hello all,

I have a question regarding sockets and a possible timeout

The background to this is that I want to send an email from my application.
Using the Sendmail application as a sample,I pulled out the basics of how to
send the mail - and it works great.

However, I'm using a Wifi link which can be a bit flakey, so if this drops connection while
the email is being sent, then the application hangs.

So, my question is, can an SMTP socket used for email have a timeout attached ?
or, would a do events statement somewhere help ?

Kind Regards from a very happy HMG user
User avatar
gfilatov
Posts: 1116
Joined: Fri Aug 01, 2008 5:42 am
Location: Ukraine
Contact:

Re: Sockets and Timeouts

Post by gfilatov »

spelman wrote:Hello all,
...
So, my question is, can an SMTP socket used for email have a timeout attached ?
or, would a do events statement somewhere help ?
Hello,

Thanks for your request!

It will be available at the next Extended build (added a new method SetSendTimeout( nMilliSec ) to TSMTP class).

BTW DO EVENTS statement don't help in this case.
Kind Regards,
Grigory Filatov

"Everything should be made as simple as possible, but no simpler." Albert Einstein
spelman
Posts: 20
Joined: Thu Sep 22, 2011 5:38 pm

Re: Sockets and Timeouts

Post by spelman »

That's brilliant - Thankyou very much
Post Reply