Membership is FREE, giving all registered users unlimited access to every Acorn Domains feature, resource, and tool! Optional membership upgrades unlock exclusive benefits like profile signatures with links, banner placements, appearances in the weekly newsletter, and much more - customized to your membership level!

Technical question re IMAP listener & WinSock Connection...

Joined
May 10, 2007
Posts
1,972
Reaction score
288
I've been chatting with my lead developer about an issue we have regarding a new bit of software.
I've asked him about the issue, and here is the technical info:

----------

The email component connects to GMail via an IMAP listener. This is a mail handling protocol that runs over TCP/IP. The Windows Server opens a WinSock connection to the mail server over port 993 using a TLS encryption algo. The problem is that the TCP/IP connection seems to get closed/dropped after about 10 mins. If I restart the listener component then it works again for another 10 mins etc. I'm using the AE.MAIL.NET IMAP library for the C# code.

I've added some code that reopens the IMAP connection every 5 mins but that still doesn't solve it. It's a real puzzler.

-------------

If anyone thinks they might know what is going on, then, please don't hesitate to get in touch.
Happy to pay for quality advice that helps resolve the issue.
Thanks, Phil
 
It sounds like you need to implement a 'keep alive' timer. I assume there's a communication protocol you can call every few mins.
 
Also it may be the client that is dropping connection. eg when using SSH you need to specify a keep alive on the server end *and* the client end. Can you not just send a 'dummy' command (eg inbox.getmessage) every few mins?
 
Generally not a good idea to keep a persistent connection if you don't need to. It might be better to poll once a minute instead?
 
I'd say the sockets timing out as its idle, you need to shoot a command every few minutes to keep it alive. There may also be a keep-alive time out somewhere. Many software settings are set at 600 seconds, which ties in with your 10 minutes..
 

The Rule #1

Do not insult any other member. Be polite and do business. Thank you!

Premium Members

Latest Comments

New Threads

Domain Forum Friends

Our Mods' Businesses

*the exceptional businesses of our esteemed moderators
General chit-chat
Help Users
  • No one is chatting at the moment.
      There are no messages in the current room.
      Top Bottom