17 TCP/IP ModelApplication layer is responsible for performing encoding, encryption etc.Transport layer provide service of courier. In real life whenever we want to send a packet to another place, we go to courier shop and give them packet with address. Transport layer is the courier for communication.Internet layer determine the path how to route the packet to target destination. In above example once packet is given to courier company, then on wards courier send that packet through some transport ( car, bus or truck). Now driver has to decide which way to go in order to reach destination. So internet layer perform that work.
18 Protocol and Port Number Represent as a logical/virtual door for incoming and outgoing packetBasically an application or service will bind with 1 port for its usage.There are 65,535 port available in any computers1 – 1023 are reserved for System Operations1024 – 65,535 are available for others
19 Protocol and Port Number Port number: It is unique identification value represents residing position of a server in the computer. It is four digit +ve number.Default port number for major protocol that is useful to knowPort 80Port 21/22Port 433Port 23Port 25
20 Protocol and Port NamePort Name: It is a valid user defined name to know about client system, the default port name for any local computer is localhost.Default port for major protocol that is useful to knowPort 80 = HttpPort 21/22 = FTPPort 433 = HttpsPort 23 = TelnetPort 25 = SMTP
21 FirewallFirewall can be either software or hardware to filter incoming and outgoing transmission for access.Firewall is a network access control device that is designed to deny all traffic except that which is explicitly allowed.
23 ProxyProxy Server is a middle man between a client computer and the network (usually internet) which has the function to disguise transmission from client
24 What is a SOCKET ?Socket is a mechanisms of communication that use to exchange datawith program in same machine or different machine
25 Socket ProgrammingSocket is a IPC (Inter Process Communication) facility for network application.To make socket communicate with other socket, so it need unique address as a identifier.Socket Address contain IP Address and Port Number. Example : : 8080IPC is a mechanism of exchange data between 1 process to another process, in a same network or different geography area.IP Address Port Number
32 Socket Type 2 type of socket that usually use : Socket Local = AF_UNIX Socket Networking = AF_INETSocket Stream = SOCK_STREAMSocket Datagram = SOCK_DGRAMExample :Socket NetworkSocket DatagramProtocol
34 JAVA OverviewJAVA is a programming language created by Sun Microsystem to fully utilized Object Oriented Programming in software development. Currently this language intellectual property (IP) is owned by OracleIt require Java Development Kit (JDK) to be installed before development could be started.As a developer, text editor could be used to form the source code or any IDE that support JAVA can be a very good choiceEclipseJcreatorNetBeansJava support Network programming by certain network library which simplified a lot of development compared to C++.
35 OverviewIn Networking application mainly two programs are running one is Client program and another is Server program.In Core java Client program can be design using Socket class and Server program can be design using ServerSocket class.Both Socket and ServerSocket classes are predefined in java.net package
36 Java Packages Java.net = TCP/IP networking Java.io = I/O Streams & UtilitiesJava.rmi = Remote InvocationJava.security = Security PoliciesJava.lang = Threading classes*java.net.ServerSocket = use for Server Connection*java.net.Socekt = use for Client Connection
37 JAVA APISocket programming use Java API component to develop socket programming application.Java API is a group of library that use for develop programed.J2SE was ready with java.net package that contain classes and interface that provide API (Application Programming Interface)Low level (Socket, ServerSocket, DatagramSocket)High Level (URL, URLConnection)
38 Connection-Oriented & Connectionless Socket A socket programming construct can make use of either the UDP (User Datagram Protocol) or TCP (Transmission Control Protocol).Sockets that use UDP for transport are known as datagram sockets, while sockets that use TCP are termed stream sockets.
39 UDP & TCP UDP = User Datagram Protocol , TCP = Transmission Control Protocol.
40 TCP Sockets Java.net.ServerSocket class Java.net.Socket class Use for server programLocal port to listen for initial connectionCan be bound to local IP for multi-homed machinesJava.net.Socket classUse for client programCombines socket with socket option (timeout, linger, keep alive, no delay)
41 UDP Sockets Java.net.DatagramSocket class Java makes no distinction between client/server for UDP sockets.Can be bound to both a local port & local IP address
42 Issues in JAVA language Java Network Programming will exhibit this issues. Some of them are:-Unable to access with low level network deviceNetwork security issuesFirewall preventing access for your applicationProxy may interfere with the inert function of your application
Your consent to our cookies if you continue to use this website.