Subject: direct forward in a single application

direct forward in a single application

From: <>
Date: Fri, 9 Sep 2011 01:46:31 +0500


I'm trying to forward local 4321 port to server 3306 port. I've used direct_tcpip.c as a start point. I establish a connection with libssh2 in a background thread. In the main thread I wait while the bg thread is authorized to the ssh host and is listening to 4321 port. Then I try to connect to this port using libmysqlclient library in the same application.

The problem is when libssh2 listens in my program and I connect to the port using separate application everything works ok. But when I try to do the same thing from the same app, accept() function writes socket error 10053: "software caused connection abort" error to "errno" global variable.

Can it be somehow related to threads?


Best Regards.

Pasha L. Topchiyev
Software Developer.
+994 70 750 9161

Sent from my iPod
Received on 2011-09-08