Bodhak java networking tutorial in this chapter we are going to learn the programming of networking using Java. The topics are covered with syntax and programming examples.
A network consists of two or more computers that are linked in order to share resources, exchange files, or allow electronic communications. The computers in a network are linked through cables, telephone lines, radio waves, satellites, or infrared light beams.
java networking tutorial
What is IP address?
An Internet Protocol address (IP address) is a numerical label assigned to each device (e.g., computer, printer) participating in a computer network that uses the internet protocol for communication.
Logically similar to the traditional mailing address
An address uniquely identifies a particular object
Each computer connected to the Internet has a unique IP address
A 32-bit number used to uniquely identify each computer connected to the Internet Ex: 127.0.0.1 (or) 188.8.131.52
what are protocols?
Definition: Set of rules and standards that define a certain type of Internet communication
Different types of communication occurring over the Internet
Each type of communication requires a specific and unique protocol
Some important protocols used over the Internet
Hypertext Transfer Protocol (HTTP): Used to transfer HTML documents on the Web
File Transfer Protocol (FTP): More general compared to HTTP
Allows you to transfer binary files over the Internet
Both protocols have their own set of rules and
standards on how data is transferred
Java provides support for both protocols
Protocols only make sense when used in the context of a service
HTTP protocol is used when you are providing Web content through an HTTP service
Each computer on the Internet can provide a variety of services
Each Application run within system identified by unique number known as port number
The type of service must be known before information can be transferred
Definition: A 16-bit number that identifies each service offered by a network server
Using a particular service to establish a line of communication through a specific protocol
Need to connect to the appropriate port