Site Announcements

Register and Login to Sanjaal Board to get access to exclusive contents including guitar tabs, high quality arts, glamor and photography pictures. New Users will be manually validated against spam database and potential advertisers. So this might cause your account activation to delay from a couple of days to few weeks. If you have Nepali/Indian/Pakistani/Bangladeshi names in your username, the user activation will be quicker. SPAMMERS WILL BE DELETED WITH NO MERCY



Postby rabin1202006 » Fri Jun 08, 2012 2:24 am


A network is a set of computers and the peripherals that are connected together physically. Networking helps to share the resources and communicate. Internet is a network of networks. Java applets can be downloaded from the website. This is the main attraction of java. Networking in java is possible through the use of package. The classes with in this package encapsulate the socket model developed by Berkeley Software Division. The below listed is used while discussing Java networking.

1) Protocol: Communication between computers in a network or a different network requires certain set of rules called as protocols. Java networking is done using TCP/IP protocol. Some of the different kinds of protocol available are HTTP( Hyper Text Transfer Protocol) which enables interaction with the internet. FTP(File Transfer Protocol) which enables transfer of file between the computers. SMTP(Simple Mail Transfer Protocal) provides e-mail facility and NNTP( Network News Transfer Protocol) acts as a bulletin board for sharing the news.

2) Socket: Sockets can be understood as a place used to plug in just like electric sockets. In case of electric sockets if a plug of toaster is plugged into a socket communication starts at the same time. It is necessary that they should follow a set of rules to communicate called protocol. Assuming that the toaster has beed plugged in the socket at the kitchen the power grid of the house should know the point of communication or the address of the socket. A network socket can be similarly understood. TCP/IP as protocol for the communication and IP address are the address of the sockets.

3) Client/Server: A computer that requests for some service from another computer is called client. The one which processes the request is called server. A server waits till one of its clients makes a request. It can accept multiple connections at a time to the same port number. Multi threading is used to serve multiple users at the same time.

4) Internet Address: Every computer is connected to a network which has a unique IP Address. It is same to every student of a batch having a unique id. An IP address is a 32 bit number that has four numbers separated by periods. It is possible to connect to the internet either by directly ot by using the Internet Service Provider. By connecting directly to the internet the computer is assigned with the permanent IP Address. In case connection is made by using ISP. It assigns a temporary IP Address for each session. A sample of IP Address is given below that is 80.0.053(IP Address).

5) Domain Naming Service: It is very difficult to remember a set of numbers to connect to the internet. The DNS is used to overcome the problem. It maps one particular IP Address to a string of characters. For e.g. Com is the domain name reserved for Nepal commercial sites. Nepal is the name of the country and www is the name of the specific computer that is Nepal's server.

6)Inet Adress: There are the classes provided in java to enable networking and found in java. net package. Inet address is one such class that is used to encapsulate the IP Address and the DNS. To create an instance of Inet Address, class factory methods are used as there are no visible constructors available for this class. Factory method are the conventions where static methods return an instance of that class.
Posts: 566
Joined: Sun Feb 05, 2012 9:05 am
Location: New Baneshwor Kathmandu Nepal

Similar topics

Return to Java Programming Discussions

Who is online

Users browsing this forum: No registered users and 1 guest