magazine resources subscribe about advertising

New Architect Daily
Commentary and updates on current events and technologies

CMP Media E-Book

Download your copy today.

Research
Search for reports and white papers from industry vendors and analysts.

This Week at NewArchitect.com Subscribe now to our free email newsletter and get notified when the site is updated with new articles







Day of Defeat Online Gaming

 New Architect > Archives > 1997 > 12 > Java Alley  

Network Programming in Java

By Bruce Eckel

Historically, network programming has been error-prone, difficult, and complex because the programmer had to know many details about the network and sometimes even the hardware. However, the concept of networking is not so very difficult: You want to move information from one machine to another. It's quite similar to reading and writing files, except that the file exists on a remote machine that determines what to do about the information you're requesting or sending.

One of Java's great strengths is painless networking. As much as possible, the underlying details of networking have been abstracted away and taken care of within the Java Virtual Machine (JVM) and local-machine installation of Java. The programming model is the file; in fact, you wrap the network connection ("socket") with InputStream and OutputStream objects, so you end up using exactly the same method calls you would with files. In addition, Java's built-in multithreading is exceptionally handy when dealing with multiple simultaneous connections.

Identifying a Machine

To differentiate between machines and ensure you are connected with the proper one, there must be a way of uniquely identifying machines on a network. Early networks provided unique names for machines within the local network, but because Java works within the Internet, a machine must be uniquely identified from all others in the world. This is accomplished with the Internet Protocol (IP) address, which is a 32-bit number that is unique across the Internet.




  Day of Defeat Online Gaming

home | daily | current issue | archives | features | critical decisions | case studies | expert opinion | reviews | access | industry events | newsletter | research | careers | info centers | advertising | subscribe | subscriber service | editorial calendar | press | contacts


Copyright © 2006 CMP Media, LLC Read our privacy policy, your California privacy rights, terms of service.
SDMG Web sites: BYTE.com, C/C++ Users Journal, Developer Pipeline, Dr. Dobb's Journal, DotNetJunkies, MSDN Magazine, Sys Admin,
SD Expo, SD Magazine, SqlJunkies, The Perl Journal, Unixreview, Windows Developer Network, New Architect

web2