Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
TCP & UDP (Transmission Control Protocol & User Datagram Protocol) Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) are the major protocols operating at Transport Layer. Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) operate very differently and you can choose Transmission Control Protocol (TCP) or User Datagram Protocol (UDP) depending on your requirement. Transmission Control Protocol (TCP) TCP stands for Transmission Control Protocol and it guarantees delivery of data packets. This protocol provides extensive error checking mechanisms such as flow control and acknowledgment of data. Transmission Control Protocol (TCP) is a connection oriented protocol. Before transmitting data, a connection must be established between the devices participating in data transmission. If your Application require guaranteed delivery of data, then you must choose TCP as the Transport layer protocol. 1) Transmission Control Protocol (TCP) is a connection oriented protocol, which means the devices should open a connection before transmitting data and should close the connection gracefully after transmitting the data. 2) Transmission Control Protocol (TCP) assure reliable delivery of data to the destination. 3) Transmission Control Protocol (TCP) protocol provides extensive error checking mechanisms such as flow control and acknowledgment of data. 4) Sequencing of data is a feature of Transmission Control Protocol (TCP). 5) Delivery of data is guaranteed if you are using Transmission Control Protocol (TCP). 6) Transmission Control Protocol (TCP) is comparatively slow because of these extensive error checking mechanisms 7) Multiplexing and Demultiplexing is possible in Transmission Control Protocol (TCP) using TCP port numbers. 8) Retransmission of lost packets is possible in Transmission Control Protocol (TCP). User Datagram Protocol (UDP) UDP stands for User Datagram protocol and it operates in Datagram mode. The main difference you should notice here is User Datagram Protocol (UDP) is a connection-less protocol. User Datagram protocol (UDP) has only the basic error checking mechanism using checksums. 1) User Datagram Protocol (UDP) is Datagram oriented protocol with no overhead for opening, maintaining, and closing a connection. 2) User Datagram Protocol (UDP) is efficient for broadcast/multicast transmission. 3) User Datagram protocol (UDP) has only the basic error checking mechanism using checksums. 4) There is no sequencing of data in User Datagram protocol (UDP) . 5) The delivery of data cannot be guaranteed in User Datagram protocol (UDP) . 6) User Datagram protocol (UDP) is faster, simpler and more efficient than TCP. However, User Datagram protocol (UDP) it is less robust then TCP 7) Multiplexing and Demultiplexing is possible in User Datagram Protcol (UDP) using UDP port numbers. 8) There is no retransmission of lost packets in User Datagram Protcol (UDP). IP Address An IP address is a binary number that uniquely identifies computers and other devices on a TCP/IP network. 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.[1] An IP address serves two principal functions: host or network interface identification and location addressing. An IP address is either a 32-bit or 128-bit unsigned number used by the internet protocol. In java, to store the host name resolutions, the class InetAddress is used. The method getLocalHost() returns the local host and the method getHostAddress() returns the IP address. Port Number: In computer networking, a port number is part of the addressing information used to identify the senders and receivers of messages. Port numbers are most commonly used with TCP/IP connections. Home network routers and computer software work with ports and sometimes allow you to configure port number settings. These port numbers allow different applications on the same computer to share network resources simultaneously. How Port Numbers Work Port numbers are associated with network addresses. For example, in TCP/IP networking, both TCP and UDP utilize their own set of ports that work together with IP addresses. Port numbers work like telephone extensions. Just as a business telephone switchboard can use a main phone number and assign each employee an extension number (like x100, x101, etc.), so a computer has a main address and a set of port numbers to handle incoming and outgoing connections. In both TCP and UDP, port numbers start at 0 and go up to 65535. Numbers in the lower ranges are dedicated to common Internet protocols (like 21 for FTP and 80 for HTTP). Socket A network socket is an endpoint of an inter-process communication flow across a computer network. Today, most communication between computers is based on the Internet Protocol; therefore most network sockets are Internet sockets. A socket API is an application programming interface (API), usually provided by the operating system, that allows application programs to control and use network sockets. Internet socket APIs are usually based on the Berkeley sockets standard. A socket address is the combination of an IP address and a port number, much like one end of a telephone connection is the combination of a phone number and a particular extension. Based on this address, internet sockets deliver incoming data packets to the appropriate application process or thread. The Socket class in Java is an endpoint in a standard TCP connection. The Socket class implements methods which take care of all the overhead required with TCP communication. URL URL stands for Uniform Resource Locator. A URL is a formatted text string used by Web browsers, email clients and other software to identify a network resource on the Internet. Network resources are files that can be plain Web pages, other text documents, graphics, or programs. URL is the global address of documents and other resources on the World Wide Web. The first part of the URL is called a protocol identifier and it indicates what protocol to use, and the second part is called a resource name and it specifies the IP address or the domain name where the resource is located. The protocol identifier and the resource name are separated by a colon and two forward slashes. URL Connection: URLConnection is a general-purpose class for accessing the attributes of a remote resource. Once you make a connection to a remote server, you can use URLConnection to inspect the properties of the remote object before actually transporting it locally. These attributes are exposed by the HTTP protocol specification and, as such, only make sense for URL objects that are using the HTTP protocol