online game/ IM protocol in java

R

Roy

Hi all,

I am thinking of writing some little online game(like pogo.com maybe)
or IM in java. But I am not sure how I can get the message from the
server. I don't want to keep refreshing the browser every second to
check for new message / new changes (using browser approach) nor using
a while loop to send http request to server (using applet)

Is there some developed technology (e.g. protocol) that when
connection is opened client and server can keep talking without using
an inefficient while loop?

Some code example would be great!

Please Advise!

Thanks
Roy

(P.S. what about it's a J2ME apps, is that apply to it too?)
 
G

Gorf

Roy said:
Hi all,

I am thinking of writing some little online game(like pogo.com maybe)
or IM in java. But I am not sure how I can get the message from the
server. I don't want to keep refreshing the browser every second to
check for new message / new changes (using browser approach) nor using
a while loop to send http request to server (using applet)

Is there some developed technology (e.g. protocol) that when
connection is opened client and server can keep talking without using
an inefficient while loop?

Some code example would be great!

java.net.Socket.
 
T

Tor Iver Wilhelmsen

Gorf said:
java.net.Socket.

The non-blocking channels in java.nio.* is perhaps preferrable if you
can use 1.4.x or 1.5.x. Socket/ServerSocket weren't written to be too
scalable AFAIK.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top