General Networking/Lan/Wan/tcp/udp packets
when we use tcp packets and when we use udp ? iknow tcp is connection oriented and udp connection less, but what does it mean. please help me out in this.
Many thanks for your question.
The Transmission Control Protocol (TCP) is one of the core protocols of the Internet Protocol Suite.
TCP is one of the two original components of the suite, complementing the Internet Protocol (IP), and therefor the entire suite is commonly referred to as TCP/IP.
TCP provides the service of exchanging data directly between two network hosts, whereas IP handles addressing and routing message across one or more networks. In particular, TCP provides reliable, ordered delivery of a stream of bytes from a program on one computer to another program on another computer.
TCP is the protocol that major Internet applications rely on, applications such as the World Wide Web, e-mail, and file transfer. Other applications, which do not require reliable data stream service, may use the User Datagram Protocol (UDP) which provides a datagram service that emphasizes reduced latency over reliability.
In easier more understandable terms, TCP connections and data transfers consist of a "path way" or "tunnel" opened up using the IP (internet Protocol) where data is then transferred back and forth through. This also allows the TCP protocol to detect bad packets or "bytes" and request the data be resent due to packet loss.
The User Datagram Protocol (UDP) With UDP, computer applications can send messages, in this case referred to as datagramís, to other hosts on an IP network (WAN/LAN) without requiring prior communications to set up special transmission channels or data paths to communicate back and forth.
UDP's stateless nature is also useful for servers answering small queries from huge numbers of clients. Unlike TCP, UDP is compatible with packet broadcast (sending to all IP's on local network) and multicasting (send to all subscribers) like in the instance of IKS servers.
Common network applications that use UDP include: the Domain Name System (DNS), streaming media applications such as IPTV, Voice over IP (VoIP), Trivial File Transfer Protocol (TFTP) and many online games.
UDP is a less reliable data transfer protocol as it does not verify each piece of data send and received, instead UDP protocol relies on the application to provide data verification and accuracy and to request any lost packets or data. In that regard it can be considered quicker
communication as every packer does not need confirming making, say, networked games run quicker.
Hope all that helps.