network programming 授課教師 : 詹益禎 中文課名 : 網路程式設計 學分時數 : 3...
TRANSCRIPT
Network ProgrammingNetwork Programming
授課教師 : 詹益禎中文課名 : 網路程式設計學分時數 : 3 學分\ 3小時助教 :李宏杰、趙振宣 教室 : 32310上課時間 : 9:05~12:00 (Wed.)
NCUE CSIE Y. C. Chan Network Programming - Fall 2008 2
ObjectiveObjective
This course will provides practical guidance on the essential aspects of network programming with Java, including the concepts of Web, files, streams, threads, the use of varied sockets, non-blocking I/O, URLConnections, protocol handlers, content handlers and Remote method invocation. The aim is to enable students to pick up these vital skill and be capable of writing varied network programs with Java.
NCUE CSIE Y. C. Chan Network Programming - Fall 2008 3
MaterialMaterial
Elliotte R. Harold, “Java Network Programming”, 3rd Edition, O’Reilly, 2004.
H. M. Deitel and P. J. Deitel, “Java How to Program”, 8th Edition, Prentice Hall, 2009.
Jan Graba, “An Introduction to network programming with Java”, 1st Edition, Addison Wesley, 2003.
NCUE CSIE Y. C. Chan Network Programming - Fall 2008 4
Grading PolicyGrading Policy
Quiz: 5 % (10/21) Midterm: 25% (11/11) Final: 30% (1/13) Homework: 40% Class Participation: 5~10% (bonus)
NCUE CSIE Y. C. Chan Network Programming - Fall 2008 5
OutlineOutline Why Networked Java Basic Network Concepts Basic Web Concepts Introduction to Java Programming Streams Threads Looking Up Internet Addresses Sockets for Clients Sockets for Servers Secure Sockets Non-Blocking I/O UDP Datagrams and Sockets Multicast Sockets Remote Method Invocation URLs and URIs HTML in Swing
NCUE CSIE Y. C. Chan Network Programming - Fall 2008 6
Why Networked JavaWhy Networked Java
What can a network program do ? Security But wait ! There’s more!
NCUE CSIE Y. C. Chan Network Programming - Fall 2008 7
Basic Network ConceptsBasic Network Concepts
Networks The Layers of a Network IP, TCP, and UDP The Internet The Client/Server Model Internet Standards
NCUE CSIE Y. C. Chan Network Programming - Fall 2008 8
Basic Web ConceptsBasic Web Concepts
URIs HTML, SGML, and XML HTTP MIME Media Types Server Side Programs
NCUE CSIE Y. C. Chan Network Programming - Fall 2008 9
Introduction to Java ProgrammingIntroduction to Java Programming
The first Java program Classes and Objects Control Statements Files
NCUE CSIE Y. C. Chan Network Programming - Fall 2008 10
StreamsStreams
Output Streams Input Streams Filter Streams Readers and Writers
NCUE CSIE Y. C. Chan Network Programming - Fall 2008 11
ThreadsThreads
Running Threads Returning Information from a Thread Synchronization Deadlock Thread Scheduling Thread Pools
NCUE CSIE Y. C. Chan Network Programming - Fall 2008 12
Looking Up Internet AddressesLooking Up Internet Addresses
The InetAddress Class Inet4Address and Inet6Address The NetworkInterface Class Some Useful Programs
NCUE CSIE Y. C. Chan Network Programming - Fall 2008 13
Sockets for ClientsSockets for Clients
Socket Basics Investigating Protocols with Telnet The Socket Class Socket Exceptions Socket Addresses Examples
NCUE CSIE Y. C. Chan Network Programming - Fall 2008 14
Sockets for ServersSockets for Servers
The ServerSocket Class Some Useful Servers
NCUE CSIE Y. C. Chan Network Programming - Fall 2008 15
Secure SocketsSecure Sockets
Secure Communications Creating Secure Client Sockets Methods of the SSLSocket Class Creating Secure Server Sockets Methods of the SSLServerSocket Class
NCUE CSIE Y. C. Chan Network Programming - Fall 2008 16
Non-Blocking I/ONon-Blocking I/O
An Example Client An Example Server Buffers Channels Readiness Selection
NCUE CSIE Y. C. Chan Network Programming - Fall 2008 17
UDP Datagrams and SocketsUDP Datagrams and Sockets
The UDP Protocol The DatagramPacket Class The DatagramSocket Class Some Useful Applications DatagramChannel
NCUE CSIE Y. C. Chan Network Programming - Fall 2008 18
Multicast SocketsMulticast Sockets
What Is a Multicast Socket? Working with Multicast Sockets Two Simple Examples
NCUE CSIE Y. C. Chan Network Programming - Fall 2008 19
Remote Method InvocationRemote Method Invocation
What Is Remote Method Invocation? Implementation Loading Classes at Runtime The java.rmi Package The java.rmi.registry Package The java.rmi.server Package
NCUE CSIE Y. C. Chan Network Programming - Fall 2008 20
URLs and URIsURLs and URIs
The URL Class The URLEncoder and URLDecoder Classes The URI Class Proxies Communicating with Server-Side Programs Thro
ugh GET Accessing Password-Protected Sites
NCUE CSIE Y. C. Chan Network Programming - Fall 2008 21
HTML in SwingHTML in Swing
HTML on Components JEditorPane Parsing HTML Cookies
NCUE CSIE Y. C. Chan Network Programming - Fall 2008 22
Welcome for joining the
course.