O'Reilly logo

Object-oriented Programming Using C++ and Java by Anand Vasappanavara, Gautam Vasappanavara, Ramesh Vasappanavara

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

22

Networking in Java

LEARNING OBJECTIVES

At the end of the chapter, you will be able to understand and use

  • TCP/IP protocols.
  • Inet addressing mechanism and URL connections.
  • TCP/IP sockets.
  • Client server applications.

22.1 Introduction

Java has been specially created for networking. What do we mean by this? Java supports a package called java.net which defines several methods for connecting and retrieving files by using common web-based protocols. Java also allows us to create unix-like sockets and allows us to implement TCP/IP sockets.

In the previous chapter on Java IO programming, you have been introduced to Input and Output Stream. By attaching those stream files with networking protocols, you can write to files on the Internet and retrieve ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required