online game/ IM protocol in java

online game/ IM protocol in java

Post by roy.cha » Wed, 14 Jul 2004 14:35:51


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?)
 
 
 

online game/ IM protocol in java

Post by Gorf » Wed, 14 Jul 2004 17:39:45


java.net.Socket.

 
 
 

online game/ IM protocol in java

Post by Tor Iver W » Thu, 15 Jul 2004 19:16:40

"Gorf" < XXXX@XXXXX.COM > writes:


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.