Page 1 of 1

TscSSHChannel question

Posted: Wed 28 May 2008 16:23
by snorkel
Hi,
I am using securebridge to tunnel PostgreSQL/MySQL connections and I have everything working, but when I run a long running query through the channel it blocks the entire application.
Does the channel object need to reside in a seperate thread? I thought that when I connected the channel it would spawn it's own thread.

What about the sshclient, does it's listener run in a thread or should I be putting that in a seperate thread as well?

Thanks,

Snorkel

Re: TscSSHChannel question

Posted: Thu 29 May 2008 11:12
by Dimon
SecureBridge creates own threads for port listener and for every new tunnel channel.
You should call the TScSSHClient.Connect and TScSSHChannel.Connect methods in the main thread of your appliction.
snorkel wrote:I am using securebridge to tunnel PostgreSQL/MySQL connections and I have everything working, but when I run a long running query through the channel it blocks the entire application.
Please send a complete sample to dmitryg*crlab*com to demonstrate this problem.

Re: TscSSHChannel question

Posted: Thu 29 May 2008 16:01
by snorkel
Dimon wrote:SecureBridge creates own threads for port listener and for every new tunnel channel.
You should call the TScSSHClient.Connect and TScSSHChannel.Connect methods in the main thread of your appliction.
snorkel wrote:I am using securebridge to tunnel PostgreSQL/MySQL connections and I have everything working, but when I run a long running query through the channel it blocks the entire application.
Please send a complete sample to dmitryg*crlab*com to demonstrate this problem.
Never mind, it was a problem in my code with a message handler in the main thread.