Re: Problems with Demo / PortForwarding - WeOnlyDo Discussion board

Re: Problems with Demo / PortForwarding (General questions)

by Michael, Tuesday, February 09, 2010, 22:49 (5402 days ago) @ Michael

Okay, some bytes travel through the tunnel.
It exits in the else-clause of the asyncReceive Function:

[code] private void asyncReceive(IAsyncResult ar)
{
int i = 0;
try
{
i = socket1.EndReceive(ar);
}
catch (Exception)
{ }
if (i > 0)
{
// be sure that the component isn't still in the connecting procedure
while (ssh1.State > WeOnlyDo.Client.SSH.States.Disconnected && ssh1.State != WeOnlyDo.Client.SSH.States.Connected);
//if the connecting procedure resulted with disconnection, bail out
if (ssh1.State == WeOnlyDo.Client.SSH.States.Disconnected)
return;
ssh1.Send(socketbuffer, 0, i);
socket1.BeginReceive(socketbuffer, 0, socketbuffer.Length, System.Net.Sockets.SocketFlags.None, new AsyncCallback(asyncReceive), this);
}
else
ssh1.Disconnect();

}[/code]

Any idea what this could cause?


Complete thread: