ruchika
09-09-2003, 05:22 PM
Hi,
My client program starts the script that establishes PPP connection in background and continues forward with its own processing. At some point, it calls connect on a non-blocking socket, and also selects the socket for completion of connection before writing, what should I look for inorder to know that the connection could not be established? Does select still indicate writablilty if connection fails? Can a timeout be specified on connect?
In some cases, the client program may want to know the reason why the connection could not be established. For eg, if the modem is not connected, if there is no carrier etc. I am thinking of creating a thread that establishes PPP connection with the updetach option inorder to catch the errors returned by pppd/chat and not block the main process. Is this the standard way to catch errors returned by PPP and know the connection state or is there another way?
Thanks,
Ruchika
My client program starts the script that establishes PPP connection in background and continues forward with its own processing. At some point, it calls connect on a non-blocking socket, and also selects the socket for completion of connection before writing, what should I look for inorder to know that the connection could not be established? Does select still indicate writablilty if connection fails? Can a timeout be specified on connect?
In some cases, the client program may want to know the reason why the connection could not be established. For eg, if the modem is not connected, if there is no carrier etc. I am thinking of creating a thread that establishes PPP connection with the updetach option inorder to catch the errors returned by pppd/chat and not block the main process. Is this the standard way to catch errors returned by PPP and know the connection state or is there another way?
Thanks,
Ruchika