Board index » delphi » WAN and IdTcpClient.Connect timing out before routers connect

WAN and IdTcpClient.Connect timing out before routers connect

Hi,

I'm trying to create a TCPClient-TCPServer connection through a WAN.
For this I have one router calls the other. Establishing a connection
between the routers works fine but takes some time. The routers start
to connect at TcpClient::Connect because this tries to reach an ip
adres in a different segment and this is intercepted by the router.
This all works fine but the TcpClient comes back with a exception
indicating that the connection failed BEFORE the routers connect. So
it times out to quickly.

I have to questions.
How can I adjust the time the TcpClient waits before it timesout?
Is this approach ever going to work?

Thanks for any advice.

Wim

 

Re:WAN and IdTcpClient.Connect timing out before routers connect


Hi Wim,

I do not know the answer to your specific question but..

An IP router forewarding packets is connectionless in operation however,
depending on the implementation, it may have to populate a route cache. The
worst case scenario occurs when all routers between the source and
destination need to go thru this process. You can test if setup time is your
problem byby first sending a ping (ICMP echo request) to your detination
host. Once you have a reply from the ping then test if your application
works. This will determine if setup time is an issue.

Also, are you sure you are not getting an ICMP error message, such as
destination unreachable, being returned by one of the routers?

Andrew

Quote
Wim Bekker <wim@#NOSPAM#divirec.com> wrote in message

news:3bcd4ea2_2@dnews...
Quote
> Hi,

> I'm trying to create a TCPClient-TCPServer connection through a WAN.
> For this I have one router calls the other. Establishing a connection
> between the routers works fine but takes some time. The routers start
> to connect at TcpClient::Connect because this tries to reach an ip
> adres in a different segment and this is intercepted by the router.
> This all works fine but the TcpClient comes back with a exception
> indicating that the connection failed BEFORE the routers connect. So
> it times out to quickly.

> I have to questions.
> How can I adjust the time the TcpClient waits before it timesout?
> Is this approach ever going to work?

> Thanks for any advice.

> Wim

Re:WAN and IdTcpClient.Connect timing out before routers connect


Andrew,

Thanks for your reply. I will see how I can fit in the ping command. I
don't know how to intercept an ICMP error message from the router but
the router connects properly.

Wim

Quote
"Andrew Smallridge" <asmal...@hotmail.com> wrote in message

news:3bde8d09_2@dnews...
Quote
> Hi Wim,

> I do not know the answer to your specific question but..

> An IP router forewarding packets is connectionless in operation
however,
> depending on the implementation, it may have to populate a route
cache. The
> worst case scenario occurs when all routers between the source and
> destination need to go thru this process. You can test if setup time
is your
> problem byby first sending a ping (ICMP echo request) to your
detination
> host. Once you have a reply from the ping then test if your
application
> works. This will determine if setup time is an issue.

> Also, are you sure you are not getting an ICMP error message, such
as
> destination unreachable, being returned by one of the routers?

> Andrew

> Wim Bekker <wim@#NOSPAM#divirec.com> wrote in message
> news:3bcd4ea2_2@dnews...
> > Hi,

> > I'm trying to create a TCPClient-TCPServer connection through a
WAN.
> > For this I have one router calls the other. Establishing a
connection
> > between the routers works fine but takes some time. The routers
start
> > to connect at TcpClient::Connect because this tries to reach an ip
> > adres in a different segment and this is intercepted by the
router.
> > This all works fine but the TcpClient comes back with a exception
> > indicating that the connection failed BEFORE the routers connect.
So
> > it times out to quickly.

> > I have to questions.
> > How can I adjust the time the TcpClient waits before it timesout?
> > Is this approach ever going to work?

> > Thanks for any advice.

> > Wim

Other Threads