Java-Gaming.org
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
Featured games (78)
games approved by the League of Dukes
Games in Showcase (406)
games submitted by our members
Games in WIP (293)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  new to networking in generell  (Read 1433 times)
0 Members and 1 Guest are viewing this topic.
Offline Cero
« Posted 2007-08-08 00:10:09 »

well I need a simple and nice example of how networking in java works. just the basics how to get information and how to send information...
does the server do a broadcast for information that all player should get, or does every player have to get it from the server.

I worked with chat examples but they are kinda confusing because they are console and there are these while(input) things...

well just try to give me a simple introduction Cheesy

thx :>

Offline Riven
« League of Dukes »

JGO Overlord


Medals: 438
Projects: 4


Hand over your head.


« Reply #1 - Posted 2007-08-08 00:51:12 »

If while(input) confuses you, you should first study Java, then it's API.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Projects: Revenge of the Titans, Titan Attacks, Droid Assault, and Ultratron
Offline Cero
« Reply #2 - Posted 2007-08-08 00:53:02 »

its not about that... the console examples make it confusing becuase they need to keep the main prog open... unlike in a frame example
thats what I'm looking for

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Riven
« League of Dukes »

JGO Overlord


Medals: 438
Projects: 4


Hand over your head.


« Reply #3 - Posted 2007-08-08 01:01:54 »

Look into Google for AWT / Swing a bit, to learn how to make GUIs

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Projects: Revenge of the Titans, Titan Attacks, Droid Assault, and Ultratron
Offline keldon85

Senior Member


Medals: 1



« Reply #4 - Posted 2007-08-08 01:03:34 »

Basically the server has a sort of waitForSocket type method, since it is the server and expects clients. The client says let me connect to THIS server, a socket is opened and now the server will [probably] create a new thread to handle the socket and wait for another socket.

You choose what data you send, you can send your own custom formatted data, xml data, or whatever tickles your fancy. Google (believe it or not) has plenty of good links for examples of Java networking code; I'm off to bed so see if you can find a better link than "Handling network timeouts".

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
 
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars and Titan!

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

The invasion has landed! On Mars! And you're there to beat 'em!
hobbles (5 views)
2013-05-22 00:54:55

cubemaster21 (74 views)
2013-05-17 21:29:12

alaslipknot (86 views)
2013-05-16 21:24:48

gouessej (115 views)
2013-05-16 00:53:38

gouessej (110 views)
2013-05-16 00:17:58

theagentd (121 views)
2013-05-15 15:01:13

theagentd (110 views)
2013-05-15 15:00:54

StreetDoggy (155 views)
2013-05-14 15:56:26

kutucuk (177 views)
2013-05-12 17:10:36

kutucuk (174 views)
2013-05-12 15:36:09
Complex number cookbook
by Roquen
2013-04-24 12:47:31

2D Dynamic Lighting
by Oskuro
2013-04-17 16:46:12

2D Dynamic Lighting
by Oskuro
2013-04-17 16:45:57

2D Dynamic Lighting
by Oskuro
2013-04-17 16:23:20

Noise (bandpassed white)
by Roquen
2013-04-05 17:36:01

Noise (bandpassed white)
by Roquen
2013-04-03 16:17:38

Java Data structures
by Roquen
2013-03-29 13:21:12

Topic Request
by kutucuk
2013-03-22 21:42:01
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!
Page created in 0.061 seconds with 20 queries.