ringtail / angular-ping

a implement of ping in javascript and angularjs
MIT License
5 stars 3 forks source link

Angular2 ping #2

Open balajun01 opened 6 years ago

balajun01 commented 6 years ago

Could you tell me how can i achieve same functionality in angular 2+ versions.

ringtail commented 6 years ago

The core script is the same. But some browser has blocked this way.

tchegito commented 6 years ago

Hi guys. Could you details how they blocked ? Because I'm using your great module since some months ago, and it seems like that doesn't work anymore in Chrome. FF is still okay. Does that confirm what you said, or maybe I've wrongly implemented my code ;)

ringtail commented 6 years ago

@tchegito Hi,I am really sorry to hear that. Because net::ERR_NAME_NOT_RESOLVED event is no more catchable in the new version Chrome or Safari. But angular-ping still works for ip connection check. So maybe we can add a dns lookup step to check domain valid and then check the ip connection valid,dns lookup can use some other rest api or simply use Webrtc or websocket. I will try it and tell you the result if any good news occur 🐒.