English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I made Tetris in Java, and I'm trying to find a good tutorial in how to implement basic networking. I want to be be able to run my program off two different computers and play a competitive game on the network or over the internet. I want to also add a feature to chat back and forth by text.

Do you know any good, straight forward tutorials that show how to do this?

2007-12-14 17:22:00 · 3 answers · asked by Jean-Francois 5 in Computers & Internet Programming & Design

3 answers

You need 2 programs. One on the server machine that accepts connections to it. One on the client machine that talks to the server program.


When developing this, you run them both on the same machine, it's the only reasonable way to do it.

The link below is a little wordy, but it should suffice. And the program that's listed after it is just extremely wordy but the initial two programs they show are not bad, although the author repeats himself just after he shows the program, apparently going through it line by line "describing" it.

The best book tutorial was written in Core Java... it's very simple, very clear, and is great for someone who doesn't have a clue about any networking jargon.

2007-12-14 17:33:50 · answer #1 · answered by Anonymous · 0 0

Java Network Programming 3rd Edition By Eliotte Rusty Harold. Publisher - O'Reilly. Good book.
Also may see Herbert Schildt. J2SE 5 Edition chapter 20 has fully functional code for a caching proxy server (except for a few minor printing mistakes which you shall be able to find out easily), and fully functional code for a download manager at the end of the book.

2007-12-15 13:07:48 · answer #2 · answered by binaryFusion 5 · 0 0

A great book is Java NIO published by O'Reilly. It evaluates efficiently managing IO operations both over networks and to/from the disk using Buffers and Channels vice stream oriented IO.

2007-12-15 01:27:42 · answer #3 · answered by Jeremy H 2 · 0 0

fedest.com, questions and answers