Download presentation
Presentation is loading. Please wait.
Published byRichard Ross Modified over 9 years ago
1
Network Programming (2) CSE 132
2
iClicker/WUTexter Question Which protocol is responsible for in-order delivery of data bytes traveling over the Internet? A.Internet Protocol (IP) B.Transmission Control Protocol (TCP) C.Domain Name Service (DNS) D.Java Socket class E.Java ServerSocket class
3
Using Sockets Time Mail Web pages Database access
4
Time National Institute of Standards and Technology (NIST) Internet Time Service (ITS) – time.nist.gov (and many other servers) Multiple protocols for reporting time – Time (RFC 868) – Daytime (RFC 867) – Network Time (RFC 1307)
5
Time (RFC-868) Open socket to port 37 Server responds with 4-byte integer – Represents seconds since 1 January 1900 – Will roll over in 2036 – Current values are negative if interpreted as a signed integer – Time.java builds up a long from 4 input bytes
6
Daytime (RFC-867) Open socket to port 13 Server responds with ASCII string – JJJJJ YR-MO-DA HH:MM:SS TT L H msADV UTC(NIST) OTM – JJJJJ is modified Julian date (started 17-Nov-1858) – YR-MO-DA and HH:MM:SS are what you expect – Daylight saving time code (50 in summer) – L Leap second coming, H health digit: 0=good – msADV milliseconds adjust for network delay – UTC(NIST) coordinated universal time – OTM on time marker
7
Mail Delivery SMTP – Simple Mail Transfer Protocol Open socket to port 25 Request/response protocol: – MAIL establish return address (sender of mail) – RCPT establish recipient(s), e.g., to: cc: bcc: – DATA send message text Server responds with result codes indicating success/failure
8
Studio 6 Caesar’s cipher – substitution cipher Each letter in plaintext is replaced by a letter some fixed number of positions down the alphabet
9
IP Address From command line prompt: – hostname – ipconfig
10
Web Browsing HTTP – Hypertext Transfer Protocol Open socket to port 80 Request/response protocol: – HEAD ask for header information (meta-info) – GET ask for contents of page Contents of page frequently in HTML (Hypertext Markup Language)
11
CD Database Access CDDB – Compact Disk Database Hosted at freedb.org Database of track listings for > 2,000,000 CDs Protocol documented on web (link on class page)
12
iClicker/WUTexter Question When using a Caesar cypher with a shift value of 2, the proper encoding of the phrase “hello world” is: A.mjqqt btwqi B.nkrru cuxrj C.gdkkn vnqkc D.ifmmp xpsme E.jgnnq yqtnf
13
Lab 4a Build on Weasley Clock from Studio W I provide a working version of Studio W My solution is listening on port 10400 Request/response protocol described in lab Build a GUI in client that acts as view for Weasley Clock model running in server
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.