UDP and TCP sockets are layer 4 ports which are associated with certain services, ie TCP80 refers to the HTTP (web) protocol, TCP443 refers to the HTTPS (SSL) secure protocol and TCP/UDP53 refers to DNS.
Java supports both TCP and UDP connections. ServerSocket and Socket classes exist for TCP. DatagramSocket exists for UDP.
A datagram socket represents a connectionless, non-guaranteed communication protocol. It represents the UDP protocol in the TCP/IP suite.Contrast this with a stream socket, which represents a connection oriented, guaranteed, communication protocol. It represents the TCP protocol in the TCP/IP suite.UDP is the underlying protocol for TCP. If you are talking OSI model, UDP is layer 3, and TCP is layer 4.
UDP
TCP and UDP are both communication network protocols. TCP protocol in its essence is to guarantee delivery of information, and in the order sent. UDP protocol is lighter, by fact of not checking for the connection to be ready to receive on the other end, not checking if the information getting to the other end is correctly received.
UDP and TCP both are transport layer protocols. UDP is connection less and TCP is connection oriented. UDP is preferred over TCP when large amount data is to be sent like on skype or video conferencing .
TCP
Netstat reports on the common tcp/ip protocols, including (but not limited to) TCP, UDP, ICMP, socket connections.
Netstat reports on the common tcp/ip protocols, including (but not limited to) TCP, UDP, ICMP, socket connections.
TCP and UDP are two different layer 4 protocols. TCP reliably sends data with acknowledgments and UDP sends data without checking if the destination received it. Skype uses UDP while email uses TCP.
In the commonly used TCP/IP communications, that would either be a TCP header, or a UDP header.In the commonly used TCP/IP communications, that would either be a TCP header, or a UDP header.In the commonly used TCP/IP communications, that would either be a TCP header, or a UDP header.In the commonly used TCP/IP communications, that would either be a TCP header, or a UDP header.
UDP is alot faster than TCP. So if its realtime obviously it has to be fast, thus UDP. The only problem is UDP isn't as reliable or as secure as TCP. But it does have the speed advantage.
It depends on whether you want speed (UDP) or reliability (TCP).