The TCP protocol is implemented in the operating system and provides a higher level of interface than IP. When you program TCP, you do not deal with datagrams. Instead, you have a channel of byte streams where you can put bytes to be delivered to the other computer, and you can read bytes from the channel that were sent by the other computer, exactly in the order as they were sent. This is a kind of connection between two computers and, what's more, between two programs.
TCP/IP
There are other protocols that are implemented over IP and that are not connection-oriented. One of them is User Datagram Protocol (UDP). It is used for services when there is no need for connections. It is also used when the data may be lost and it is more important ...
Get Java Projects - Second Edition 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.