Forums Register Login

why use raw sockets for online multiplayer games

+Pie Number of slices to send: Send
hi,
i am trying to build a multiplayer online game in applets. i would like to know why do we make the server application which accepts connections on a specified port, when we can simply make the server application in servlets/jsp. By making raw sockets, we restrict our game to be played behind a firewall.
Should i design my own protocol for transmitting messages between client and server. Can i communicate with XML Or can i use JAXM or anything else?
What would be the best solution?
+Pie Number of slices to send: Send
The limitation with a servlet solution is that the connection is one way from client to server. Thus, your client would need to "poll" the server for updates.
if you use a regular socket connection, then the communication between client and server can be handled asynchronously. Meaning the server can push data to the client without the client first requesting it...
That's the difference. Using Servlets would work, but it will not be acceptable for online games that require quick response as you'd have to poll the servlet too much.
She's out of the country right now, toppling an unauthorized dictatorship. Please leave a message with this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1209 times.
Similar Threads
On-line multiplayer mobile game solution?
The Black Box: Reloaded
Ajax Security Libraries
Use of sockets through RMI
Java Chat Server
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 01:38:40.