Top 50+ Advanced Network Programming Questions 2020-21 - 1

Question: 1

What are datagram’s and sockets?

A socket represents a connection point into a TCP/IP network between two computers; one of which is the server and the other is the client.

Sockets are used to access the Web server.

These socket’s are available in the Java Socket class.

Sockets act as virtual passageways for communication through which the data connectionless.

The connection oriented socket operates similarly to a telephone type of socket is the connectionless socket.

This type of sockets is called a Datagram.

This socket operates similarly to the mail.

A characteristic of the Datagram is that it allows only one message to be sent at a time.

The delivery of data is not guaranteed because Datagrams use the UDP Protocol.

Question: 2

What are the two important TCP Socket classes?

Socket and ServerSocket.

ServerSocket is used for normal two way socket communication. Socket class allows us to read and write through the sockets.

getInputStream() and getOutputStream() are the two methods available in Socket class.

Question: 3

In OSI N/W architecture, the dialog control and token management are responsibilities of which layer?

Session layer

Question: 4

What’s the factory method?

Factory methods are merely a convention where static methods in a class return an instance of that class.

The Inet Address class has no visible constructors.

To create an InetAddess object, you have to use one of the available factory methods.

In InetAddress the three methods getLocalHost, getByName, getByAllName can be used to create instances of InetAddress.

Error Report!

Related Questions