C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML
Java NetworkingJava Networking is a concept of connecting two or more computing devices together so that we can share resources. Java socket programming provides facility to share data between different computing devices. Advantage of Java Networking
The java.net package supports two protocols,
Java Networking TerminologyThe widely used Java networking terminologies are given below:
1) IP AddressIP address is a unique number assigned to a node of a network e.g. 192.168.0.1 . It is composed of octets that range from 0 to 255. It is a logical address that can be changed. 2) ProtocolA protocol is a set of rules basically that is followed for communication. For example:
3) Port NumberThe port number is used to uniquely identify different applications. It acts as a communication endpoint between applications. The port number is associated with the IP address for communication between two applications. 4) MAC AddressMAC (Media Access Control) address is a unique identifier of NIC (Network Interface Controller). A network node can have multiple NIC but each with unique MAC address. For example, an ethernet card may have a MAC address of 00:0d:83::b1:c0:8e. 5) Connection-oriented and connection-less protocolIn connection-oriented protocol, acknowledgement is sent by the receiver. So it is reliable but slow. The example of connection-oriented protocol is TCP. But, in connection-less protocol, acknowledgement is not sent by the receiver. So it is not reliable but fast. The example of connection-less protocol is UDP. 6) SocketA socket is an endpoint between two way communications. Visit next page for Java socket programming. java.net packageThe java.net package can be divided into two sections:
The java.net package provides many classes to deal with networking applications in Java. A list of these classes is given below:
List of interfaces available in java.net package:
Next TopicJava Socket Programming
|