P
Pattt
All,
I'm currently programming a socket client library.
I want to access a server via ppp
I can detect when the server close the socket
I wan to detect when the modem is switch to off and I can NOT.
Here is my code
lRet = select(uiSocket + 1, &fdsRead, NULL, NULL, &timeout);
switch (lRet)
{
case SOCKET_ERROR:
// Pbm with cnx
break;
case 0:
// Timeout reached, nothing to read
break;
default:
if (FD_ISSET(uiSocket, &fdsRead))
{
lLen = recv(uiSocket, ptrChar2Get, 1, 0);
if (lLen <= 0)
{
// Pbm with cnx
}
// everything is fine
}
}
Any idea?
Patrick.
I'm currently programming a socket client library.
I want to access a server via ppp
I can detect when the server close the socket
I wan to detect when the modem is switch to off and I can NOT.
Here is my code
lRet = select(uiSocket + 1, &fdsRead, NULL, NULL, &timeout);
switch (lRet)
{
case SOCKET_ERROR:
// Pbm with cnx
break;
case 0:
// Timeout reached, nothing to read
break;
default:
if (FD_ISSET(uiSocket, &fdsRead))
{
lLen = recv(uiSocket, ptrChar2Get, 1, 0);
if (lLen <= 0)
{
// Pbm with cnx
}
// everything is fine
}
}
Any idea?
Patrick.