

























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


























Overview
Background Concepts & terms Network applications Java’s objected-oriented view Java’s networking API
(Application Program Interface)
Last lecture
This lecture
Client / Server Model Examples
Application
Client
Server
Web Browsing
Internet Explorer,
Mozilla Firefox
Apache,
Microsoft IIS
MS Outlook,Thunderbird
Exchange
Streaming
Music
Windows Media
Player, iTunes
Internet Radio
Online Gaming
World of Warcraft,Halo 3, PartyPoker
Game / Realm
Servers
Client Programming
Determine server location – IP address & port
Open network connection to server
Write data to server (request)
Read data from server (response)
Close network connection
Stop client
Advanced Server Programming
Loop
Handles multiple connections in order Limits on amount of network traffic Not resilient in face of slow / stopped clients
Multithreading
Allows multiple simultaneous connections
Networking in Java
java.net
Networking
java.io
I/O streams & utilities
java.rmi
Remote Method Invocation
java.security
Security policies
java.lang
Threading classes
Data transport
Socket classes
Network services
URL classes
Utilities & security
Java Networking Classes
InetAddress
DatagramPacket
Socket ServerSocket DatagramSocket
InetAddress Class
Performs DNS lookup
getLocalHost( ) getByName(String host) getByAddress(byte[ ] addr)
DatagramPacket Class
DatagramPacket Methods
Socket Class
Machine name or IP address Port number
Standard Java I/O streams
Bytes
InputStream, OutputStream
Characters
FileReader, PrintWriter
Socket Methods
ServerSocket Methods
Connection Oriented