no route to host
- From: jasen <jasen@xxxxxxxxxxx>
- Date: Tue, 18 Jul 2006 10:43:27 -0000
I think I need a way to explicitly retry routing to an address.
I'm having trouble with an program I'm developing it connects to a news
server and sucks articles which it posts to a different news server
( suck, slrnpull, etc are no good unless there's one that can handle the mess
that leafnode makes )
anyway the problem I'm getting is when the modem loses the connection
(various causes) and then the program tries to reconnect
it causes the modem to dial again and it eventually connects
but after it connects the the application still can't connect to the server
it gets "no route to host" when it tries.
restarting the application fixes this.
sockfd=socket(PF_INET,SOCK_STREAM,IPPROTO_TCP);
if( sockfd < 0)
{
perror("no socket!");
return sockfd;
}
addr.sin_port=htons(119);
addr.sin_family=AF_INET;
addr.sin_addr=**app;
printf("host %s has address %s\n",host,inet_ntoa (**app));
if( ! connect(sockfd,(void*)&addr,sizeof addr)) return sockfd;
perror("no connect!");
close(sockfd);
return -1;
I notice the same behavior with ping (netkit) , once it's done
"no route to host" once it'll never work again. again, restarting
it or starting a new instance will work once the route is restored.
how can I get the stotware to reconnect over the new PPP connection
I don't need to restart mozilla it will connect... just other programs
like ping have problems.
Bye.
Jasen
.
- Follow-Ups:
- Re: no route to host
- From: davids
- Re: no route to host
- Prev by Date: Re: client server programming
- Next by Date: ZModem communication within C Applications?
- Previous by thread: Re: client server programming
- Next by thread: Re: no route to host
- Index(es):
Relevant Pages
|