Using TCP

Use TCP if you need highly reliable delivery of information across a network. TCP is a Transport layer protocol that is a connection-oriented protocol. It exchanges a series of datagram packets (called a handshake) with the destination host computer to establish the availability of the destination host and to let the host know about the sending host before any user data are actually transmitted. Because UDP doesn't have the handshaking overhead, it's faster.

Once the connection between the sending and receiving hosts is established, the fundamental unit of data transmission is no longer considered to be the datagram packet. Each packet is now considered to be a segment in a stream of data flowing between machines. TCP uses a system ...

Get JavaBeans Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.