Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java: Best Place to Begin Learning Basic Networking [closed]

I am trying to write a simple networked chat program in Java. I have almost no networking experience. I was wondering what resources I should begin looking at (beside here of course).

Sticking with the core Java API would be best for now.

like image 540
jjnguy Avatar asked Sep 18 '08 18:09

jjnguy


People also ask

Is java good for networking?

Java is the first programming language designed from the ground up with networking in mind. As the global Internet continues to grow, Java is uniquely suited to build the next generation of network applications.

Which are the classes used for networking in java?

Through the classes in java.net , Java programs can use TCP or UDP to communicate over the Internet. The URL , URLConnection , Socket , and ServerSocket classes all use TCP to communicate over the network. The DatagramPacket , DatagramSocket , and MulticastSocket classes are for use with UDP.

Which protocols are used for java networking?

The java.net package supports two protocols, TCP: Transmission Control Protocol provides reliable communication between the sender and receiver. TCP is used along with the Internet Protocol referred as TCP/IP.

What is protocol in java programming?

Protocol is a term used by particular object-oriented programming languages with a variety of specific meanings, which other languages may term interface or trait. When used otherwise, "protocol" is akin to a communication protocol, indicating the chain of interactions between the caller and the object.


2 Answers

I found a great tutorial into networking and java from sun's own website: http://download.oracle.com/javase/tutorial/networking/TOC.html

The socket section even has you write a mini client / server chat demo.

like image 182
zxcv Avatar answered Oct 26 '22 23:10

zxcv


I recommend you to first learn networking. If you have time read the Tanenbaum book, the greatest reference in networking. If you want a quick leard, here is a road map:

  • OSI layers
  • UDP and TCP/IP
  • Sockets
  • Broadcast and Multicast
  • Network security

Then go with Java: Socket, ServerSocket, DatagramSocket, RMI, etc.

like image 31
Marcio Aguiar Avatar answered Oct 26 '22 23:10

Marcio Aguiar