6.7 Summary
As mentioned in Chapter 5, the BSD Internet domain sockets use the TCP/IP (or UDP/IP) protocol suite as the communication protocols among processes. TCP is a connection-oriented protocol and it implements a connection as a stream of bytes from source to destination, while UDP is a connectionless transport protocol and uses datagrams to implement its communication. In this chapter we discussed the datagrams for the TCP/UDP communications. Java provides the reliable stream-based communication for TCP as well as the unreliable datagram communication for UDP. The stream-based communication is like a telephone system which has the connection built first, whereas datagram communication is like a mail system which has no fixed connection. Java various input/output streams allow application programs to input and output various data, such as bytes, string, file etc. The Java socket API provides the basis of TCP/UDP communication. Various examples presented in the chapter have been a great help for readers in writing Java TCP/UDP programs of their own.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Rights and permissions
Copyright information
© 2005 Springer Science + Business Media, Inc.
About this chapter
Cite this chapter
(2005). TCP/UDP Communication in Java. In: Distributed Network Systems. Network Theory and Applications, vol 15. Springer, Boston, MA. https://doi.org/10.1007/0-387-23840-9_6
Download citation
DOI: https://doi.org/10.1007/0-387-23840-9_6
Publisher Name: Springer, Boston, MA
Print ISBN: 978-0-387-23839-5
Online ISBN: 978-0-387-23840-1
eBook Packages: Computer ScienceComputer Science (R0)