EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Test that forwarded port is ready

Posted: 06/28/2007 07:52:18
by Peter Back (Standard support level)
Joined: 03/14/2007
Posts: 6


I have a database connection to MySQL and it has a 'Before Connect' event. I would like to bring up the secure connection and the forwarded port 3306 at this time but although waiting for OnAuthenticated to complete works 50% of the time, sometimes it is marginally too soon and the connection fails. Now I suppose I could use a timer, or perhaps sleep the main thread (but I think this might cause problems), but none of this seems elegant enough.

Is there a safe way to determine whether a forwarded port is ready to accept connections?

Peter Back
Posted: 06/28/2007 08:07:36
by Ken Ivanov (Team)

I'm not sure if I understood your problem correctly. TElLocalPortForwarding and TElRemotePortForwarding components fire OnOpen event when they are ready to accept new connections.
Posted: 06/28/2007 08:31:13
by Peter Back (Standard support level)
Joined: 03/14/2007
Posts: 6

I have not found this to be entirely true. Perhaps it's a windows problem but I can't get that to work reliably either. Sometimes it's just a a little bit too soon and a connection made in the OnOpen event seems to fail. Whereas if I put two buttons on a page, bring up the ssh connection first and make my connection second I never have a problem.
Posted: 06/28/2007 08:48:15
by Ken Ivanov (Team)

Now I see. We will review the code and try to find a solution for the problem. Thank you for pointing us at this.
Posted: 06/28/2007 09:05:26
by Peter Back (Standard support level)
Joined: 03/14/2007
Posts: 6

Many thanks, good luck with it! :-)



Topic viewed 2317 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS business operates as a division of /n software, inc. For more information, please read the announcement.

Got it!