Page 1 of 1

help out with java programming :)

Posted: Tue Feb 25, 2014 6:16 pm
by PraveenAlexis
well, im developing a google chrome app for my COD MW3 server to check its online status via ping method, im basically a newbie to java script! can anybody help me out with the coading? it should work like this, if the server response for the ping then it should display the online.png file if else offline.png file! (one of my friend suggested me of updating a XML file something i totally didnt get it, if anyone can explain how that works too?)

if theres any suggestion i would appreciate it :)
than you!

Re: help out with java programming :)

Posted: Wed Feb 26, 2014 6:21 pm
by SemiconductorCat
It is most unfortunate that ping/pong api still does not support in websockets.
It's said that there are extensions going on but they are experimental.

How about another method like readinga image file on your server. If that successful you could assume that it's server is on.

You could use xml to advertise server online status. For a example who are the players currently online , what are the game opening on the server at the current time etc. This is very easy because there are SAX and it's well supported. Since that is a very small XML file sax is more than enough there.

But you COULD definitely do this with javascript. But there's no simple way for this like webscokets. Using AJAX you could do this, but it seems difficult. Since the ping packet is not neither UDP or TCP they are not implemented on API's.
The point is chatzilla IRC client does this. [There should be a ping request to another peer ]. So you may read the chatzilla source code and may be you could harvest a method or codes which perform this operation.

In action script you could do this directly. Or in a java applet.

Re: help out with java programming :)

Posted: Mon Mar 03, 2014 9:33 pm
by Neo
As Semi status above, the method I also know is AJAX for this. It could be used to fetch data from server through a client (mostly browser) without refreshing the current page. When it comes to Chrome aps, you would find more easier solutions if they have a separate API as far as I remember. Let us know your findings, so we can continue.

This might be a good application for you.
https://chrome.google.com/webstore/deta ... flimbnkabi