ping method almost there
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3827 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -477,6 +477,14 @@ wxDialUpManagerImpl::CheckStatusInternal(void)
|
|||||||
// sys_error("cannot create socket for gw");
|
// sys_error("cannot create socket for gw");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#if 0
|
||||||
|
// PING method:
|
||||||
|
|
||||||
|
if(sendto(sockfd, "hello", strlen("hello"), /* flags */ 0, &serv_addr,
|
||||||
|
sizeof(serv_addr)) == -1)
|
||||||
|
return;
|
||||||
|
#endif
|
||||||
|
|
||||||
if( connect(sockfd, (struct sockaddr *) &serv_addr, sizeof(serv_addr)) < 0)
|
if( connect(sockfd, (struct sockaddr *) &serv_addr, sizeof(serv_addr)) < 0)
|
||||||
{
|
{
|
||||||
//sys_error("cannot connect to server");
|
//sys_error("cannot connect to server");
|
||||||
@@ -484,6 +492,7 @@ wxDialUpManagerImpl::CheckStatusInternal(void)
|
|||||||
}
|
}
|
||||||
//connected!
|
//connected!
|
||||||
close(sockfd);
|
close(sockfd);
|
||||||
|
m_IsOnline = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user