Java-Part 10

Java-Part 9 Index   Java – Part 11

*The I/P is a low level routing protocol that breaks data into small packets & sends them to a address across a network.

*The TCP is a higher level protocol that manages to robustly string together these packets, sorting & re transmitting them as necessary to reliably transmit your data.

*The UDP sits next to TCP  & can be used directly to support fast, connection less unreliable transport of packets.

*A port is a numbered socket on a particular machine.

*A server is allowed to accept multiple client connected to same port number. Although each session is unique.

*A proxy server speaks the client side of a protocol to another server.

*The internet address is a number that uniquely identifies each computer on the net.

*IPV4[ 32 bit values], IPV6[48 bit values].

*InetAddress[C] => It is used to encapsulate with the numerical I/P address & domain name for that address. You can interact with this class by using the name of I/P host. InetAddress has no visible constructors. To create this object we have to use the factory methods.

*A factory methods merely a convention where by static methods in a class return an instance of that class.

*On the internet it is common to use the same name for different machine

*TCP/IP socket are used to implement reliable, bidirectional persistent point to point stream based connections between hosts on the internet.

*A Socket can be used to connect java I/O system to other programs that may reside either on the local machine or an any other machine on the internet.

*There are 2 types of TCP sockets.

  1. ServerSocket
  2. Socket

*The ServerSocket class designed to be a listener which waits for client to connect before doing anything.

*The Socket class is designed to connect to ServerSocket & initiates protocol exchanges. The creation of Socket object implicitly establishes a connection between the client and server.

*There are no methods or constructors that explicitly exposes the details of establishing a connection.

*URL[C] => The web is a loose connection of higher level protocols & file formats all unified in a web browser.

*UrlConnection[C] => It is used to get the information on the internet. We create this object using open connection() method.

*TCP/IP Server Socket =>When you create a ServerSocket, it will register itself with the system as having an interest in client connections.

*ServerSocket has a method called accept() which is a blocking call that will wait for a client to initiate communications & then return with normal socket that is used for communication with the client.

*Java implements datagrams on top of the UDP protocols by using 2 classes.

  1. DataGramPacket
  2. DataGramSocket

*TCP/IP reservers lower 1024 ports for specific protocols

  • 21 – FTP
  • 23 – Telnet
  • 25 – Email
  • 79 – Finger
  • 80 – Http
  • 119 – NetNews

Java-Part 9 Index   Java – Part 11

2 thoughts on “Java-Part 10

Leave a comment