issue in github
https://github.com/NodeBB-Community/nodebb-plugin-recent-cards/issues/48
Plugin request: Service Monitor
-
Tried
ping({host: 'chi.bdit.ca', port: 9999}, onPing);
said it is closed. -
Everything shows open for me as well. Even the example that @baris gave.
I'm not 100% sure you can check open ports via pure javascript except from maybe the client side? I've seen some javascript "port scanners" but I believe they check to see whether or not the client can access that port, not necessarily if it's online.
-
@bentael when I was researching it I came across this: http://www.hacksparrow.com/a-port-scanner-in-node-js.html
Not sure if that's helpful or not, or how that works, but yeah.
-
@theepiphany yea it's easier server-side (or in NodeJS in this case), but I was trying to have that done on the browser somehow.. to save some bandwidth on the server .. that could get really hairy if you have a lot of users online and a lot servers to ping.
-
ill give it another shot tomorrow.. gotta finish up some stuff for my day-job.
-
@bentael Makes sense. Would probably be better to globally cache/save the status' and check them after a certain interval or something? Not sure.
-
Still not successful client-side
-- need server hAlp
-
Checked your jsBin from earlier, 9999 says it is closed again
-
@julian yea but i try some fake url it would say OPEN
so I would need another way to resolve?
-
That could be worth a shot. Try overriding
onerror
to see if it is being run instead ofonload
?