J
Jimmy
I am going to write a multi-player board game (I've actually already
written one version, with a java server and VB client). I'd like the
players to be able to play over the web, through an ajax client. I
don't know much about ajax yet. It appears that the XMLHttpRequest (or
whatever it is called) can only generate GET and POST requests through
the http protocol. In that case, I am going to have to either
a) write a server that understands http (maybe not too hard with java's
built-in classes)
or
b) use servlets w/tomcat or some other framework that will handle the
http for me and have the servlet keep a socket connection to the game
server, which speaks its own protocol.
Which should I go for? Also, I am concerned about losing some power by
going to http - like the server is not able to initiate contact with
the client (to notify it of moves made by the other player), and there
is no notification if the client shuts down their window (is that
true?). Is there any better way to accomplish these things than just
having the clients poll the server every 500ms or so?
Thanks for any advice.
written one version, with a java server and VB client). I'd like the
players to be able to play over the web, through an ajax client. I
don't know much about ajax yet. It appears that the XMLHttpRequest (or
whatever it is called) can only generate GET and POST requests through
the http protocol. In that case, I am going to have to either
a) write a server that understands http (maybe not too hard with java's
built-in classes)
or
b) use servlets w/tomcat or some other framework that will handle the
http for me and have the servlet keep a socket connection to the game
server, which speaks its own protocol.
Which should I go for? Also, I am concerned about losing some power by
going to http - like the server is not able to initiate contact with
the client (to notify it of moves made by the other player), and there
is no notification if the client shuts down their window (is that
true?). Is there any better way to accomplish these things than just
having the clients poll the server every 500ms or so?
Thanks for any advice.